diff --git a/README.md b/README.md index 85f70009d..70ee46d90 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 5.4.0 + 5.5.0 pom import diff --git a/google-cloud-automl-bom/pom.xml b/google-cloud-automl-bom/pom.xml index 939305a35..1fe9f024e 100644 --- a/google-cloud-automl-bom/pom.xml +++ b/google-cloud-automl-bom/pom.xml @@ -60,21 +60,11 @@ - - com.google.api.grpc - grpc-google-cloud-automl-v1beta1 - 0.82.3-SNAPSHOT - com.google.api.grpc grpc-google-cloud-automl-v1 1.1.3-SNAPSHOT - - com.google.api.grpc - proto-google-cloud-automl-v1beta1 - 0.82.3-SNAPSHOT - com.google.api.grpc proto-google-cloud-automl-v1 diff --git a/google-cloud-automl/clirr-ignored-differences.xml b/google-cloud-automl/clirr-ignored-differences.xml index 626dbe9e6..0d5922bd1 100644 --- a/google-cloud-automl/clirr-ignored-differences.xml +++ b/google-cloud-automl/clirr-ignored-differences.xml @@ -16,4 +16,9 @@ com/google/cloud/automl/v1/AutoMlClient com.google.longrunning.Operation createDataset(com.google.cloud.automl.v1.CreateDatasetRequest) + + + 8001 + com/google/cloud/automl/v1beta1/** + \ No newline at end of file diff --git a/google-cloud-automl/pom.xml b/google-cloud-automl/pom.xml index a0945d5c9..b789d35e8 100644 --- a/google-cloud-automl/pom.xml +++ b/google-cloud-automl/pom.xml @@ -42,10 +42,6 @@ proto-google-common-protos - - com.google.api.grpc - proto-google-cloud-automl-v1beta1 - com.google.api.grpc proto-google-cloud-automl-v1 @@ -74,11 +70,6 @@ test - - com.google.api.grpc - grpc-google-cloud-automl-v1beta1 - test - com.google.api.grpc grpc-google-cloud-automl-v1 diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java deleted file mode 100644 index e0f3bbd73..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java +++ /dev/null @@ -1,3497 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.longrunning.OperationFuture; -import com.google.api.gax.paging.AbstractFixedSizeCollection; -import com.google.api.gax.paging.AbstractPage; -import com.google.api.gax.paging.AbstractPagedListResponse; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.automl.v1beta1.stub.AutoMlStub; -import com.google.cloud.automl.v1beta1.stub.AutoMlStubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND SERVICE -/** - * Service Description: AutoML Server API. - * - *

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

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

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

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

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

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

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

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

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

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

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

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

To customize credentials: - * - *

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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   autoMlClient.deleteDatasetAsync(name).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the dataset to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deleteDatasetAsync(DatasetName name) { - DeleteDatasetRequest request = - DeleteDatasetRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteDatasetAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a dataset and all of its contents. Returns empty response in the - * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` - * in the [metadata][google.longrunning.Operation.metadata] field. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   autoMlClient.deleteDatasetAsync(name.toString()).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the dataset to delete. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deleteDatasetAsync(String name) { - DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder().setName(name).build(); - return deleteDatasetAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a dataset and all of its contents. Returns empty response in the - * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` - * in the [metadata][google.longrunning.Operation.metadata] field. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   DeleteDatasetRequest request = DeleteDatasetRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   autoMlClient.deleteDatasetAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deleteDatasetAsync( - DeleteDatasetRequest request) { - return deleteDatasetOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a dataset and all of its contents. Returns empty response in the - * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` - * in the [metadata][google.longrunning.Operation.metadata] field. - * - *

Sample code: - * - *


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

Sample code: - * - *


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

For Tables: * A - * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] parameter must be - * explicitly set. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   InputConfig inputConfig = InputConfig.newBuilder().build();
-   *   autoMlClient.importDataAsync(name, inputConfig).get();
-   * }
-   * 
- * - * @param name Required. Dataset name. Dataset must already exist. All imported annotations and - * examples will be added. - * @param inputConfig Required. The desired input location and its domain specific semantics, if - * any. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture importDataAsync( - DatasetName name, InputConfig inputConfig) { - ImportDataRequest request = - ImportDataRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setInputConfig(inputConfig) - .build(); - return importDataAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Imports data into a dataset. For Tables this method can only be called on an empty Dataset. - * - *

For Tables: * A - * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] parameter must be - * explicitly set. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   InputConfig inputConfig = InputConfig.newBuilder().build();
-   *   autoMlClient.importDataAsync(name.toString(), inputConfig).get();
-   * }
-   * 
- * - * @param name Required. Dataset name. Dataset must already exist. All imported annotations and - * examples will be added. - * @param inputConfig Required. The desired input location and its domain specific semantics, if - * any. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture importDataAsync( - String name, InputConfig inputConfig) { - ImportDataRequest request = - ImportDataRequest.newBuilder().setName(name).setInputConfig(inputConfig).build(); - return importDataAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Imports data into a dataset. For Tables this method can only be called on an empty Dataset. - * - *

For Tables: * A - * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] parameter must be - * explicitly set. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   InputConfig inputConfig = InputConfig.newBuilder().build();
-   *   ImportDataRequest request = ImportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setInputConfig(inputConfig)
-   *     .build();
-   *   autoMlClient.importDataAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture importDataAsync( - ImportDataRequest request) { - return importDataOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Imports data into a dataset. For Tables this method can only be called on an empty Dataset. - * - *

For Tables: * A - * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] parameter must be - * explicitly set. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


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

For Tables: * A - * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] parameter must be - * explicitly set. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   autoMlClient.exportDataAsync(name, outputConfig).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the dataset. - * @param outputConfig Required. The desired output location. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportDataAsync( - DatasetName name, OutputConfig outputConfig) { - ExportDataRequest request = - ExportDataRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setOutputConfig(outputConfig) - .build(); - return exportDataAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports dataset's data to the provided output location. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   autoMlClient.exportDataAsync(name.toString(), outputConfig).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the dataset. - * @param outputConfig Required. The desired output location. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportDataAsync( - String name, OutputConfig outputConfig) { - ExportDataRequest request = - ExportDataRequest.newBuilder().setName(name).setOutputConfig(outputConfig).build(); - return exportDataAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports dataset's data to the provided output location. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportDataRequest request = ExportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   autoMlClient.exportDataAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportDataAsync( - ExportDataRequest request) { - return exportDataOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports dataset's data to the provided output location. Returns an empty response in the - * [response][google.longrunning.Operation.response] field when it completes. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportDataRequest request = ExportDataRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = autoMlClient.exportDataCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable exportDataCallable() { - return stub.exportDataCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a model. Returns `google.protobuf.Empty` in the - * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` - * in the [metadata][google.longrunning.Operation.metadata] field. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   autoMlClient.deleteModelAsync(name).get();
-   * }
-   * 
- * - * @param name Required. Resource name of the model being deleted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deleteModelAsync(ModelName name) { - DeleteModelRequest request = - DeleteModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deleteModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a model. Returns `google.protobuf.Empty` in the - * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` - * in the [metadata][google.longrunning.Operation.metadata] field. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   autoMlClient.deleteModelAsync(name.toString()).get();
-   * }
-   * 
- * - * @param name Required. Resource name of the model being deleted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deleteModelAsync(String name) { - DeleteModelRequest request = DeleteModelRequest.newBuilder().setName(name).build(); - return deleteModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a model. Returns `google.protobuf.Empty` in the - * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` - * in the [metadata][google.longrunning.Operation.metadata] field. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   autoMlClient.deleteModelAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deleteModelAsync( - DeleteModelRequest request) { - return deleteModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deletes a model. Returns `google.protobuf.Empty` in the - * [response][google.longrunning.Operation.response] field when it completes, and `delete_details` - * in the [metadata][google.longrunning.Operation.metadata] field. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeleteModelRequest request = DeleteModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = autoMlClient.deleteModelCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deleteModelCallable() { - return stub.deleteModelCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A - * model is considered export-able if and only if it has an export format defined for it in - * - *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
-   *   autoMlClient.exportModelAsync(name, outputConfig).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the model to export. - * @param outputConfig Required. The desired output location and configuration. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportModelAsync( - ModelName name, ModelExportOutputConfig 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, "export-able", model to a user specified Google Cloud Storage location. A - * model is considered export-able if and only if it has an export format defined for it in - * - *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
-   *   autoMlClient.exportModelAsync(name.toString(), outputConfig).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the model to export. - * @param outputConfig Required. The desired output location and configuration. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportModelAsync( - String name, ModelExportOutputConfig outputConfig) { - ExportModelRequest request = - ExportModelRequest.newBuilder().setName(name).setOutputConfig(outputConfig).build(); - return exportModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A - * model is considered export-able if and only if it has an export format defined for it in - * - *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
-   *   ExportModelRequest request = ExportModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   autoMlClient.exportModelAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportModelAsync( - ExportModelRequest request) { - return exportModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A - * model is considered export-able if and only if it has an export format defined for it in - * - *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
-   *   ExportModelRequest request = ExportModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.exportModelOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - exportModelOperationCallable() { - return stub.exportModelOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A - * model is considered export-able if and only if it has an export format defined for it in - * - *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
-   *   ExportModelRequest request = ExportModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = autoMlClient.exportModelCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable exportModelCallable() { - return stub.exportModelCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the - * dataset the model was created from), together with their ground truth annotations and the - * annotations created (predicted) by the model. The examples, ground truth and predictions are - * exported in the state they were at the moment the model was evaluated. - * - *

This export is available only for 30 days since the model evaluation is created. - * - *

Currently only available for Tables. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
-   *   autoMlClient.exportEvaluatedExamplesAsync(name, outputConfig).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the model whose evaluated examples are to be - * exported. - * @param outputConfig Required. The desired output location and configuration. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportEvaluatedExamplesAsync( - ModelName name, ExportEvaluatedExamplesOutputConfig outputConfig) { - ExportEvaluatedExamplesRequest request = - ExportEvaluatedExamplesRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setOutputConfig(outputConfig) - .build(); - return exportEvaluatedExamplesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the - * dataset the model was created from), together with their ground truth annotations and the - * annotations created (predicted) by the model. The examples, ground truth and predictions are - * exported in the state they were at the moment the model was evaluated. - * - *

This export is available only for 30 days since the model evaluation is created. - * - *

Currently only available for Tables. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
-   *   autoMlClient.exportEvaluatedExamplesAsync(name.toString(), outputConfig).get();
-   * }
-   * 
- * - * @param name Required. The resource name of the model whose evaluated examples are to be - * exported. - * @param outputConfig Required. The desired output location and configuration. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportEvaluatedExamplesAsync( - String name, ExportEvaluatedExamplesOutputConfig outputConfig) { - ExportEvaluatedExamplesRequest request = - ExportEvaluatedExamplesRequest.newBuilder() - .setName(name) - .setOutputConfig(outputConfig) - .build(); - return exportEvaluatedExamplesAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the - * dataset the model was created from), together with their ground truth annotations and the - * annotations created (predicted) by the model. The examples, ground truth and predictions are - * exported in the state they were at the moment the model was evaluated. - * - *

This export is available only for 30 days since the model evaluation is created. - * - *

Currently only available for Tables. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
-   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   autoMlClient.exportEvaluatedExamplesAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportEvaluatedExamplesAsync( - ExportEvaluatedExamplesRequest request) { - return exportEvaluatedExamplesOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the - * dataset the model was created from), together with their ground truth annotations and the - * annotations created (predicted) by the model. The examples, ground truth and predictions are - * exported in the state they were at the moment the model was evaluated. - * - *

This export is available only for 30 days since the model evaluation is created. - * - *

Currently only available for Tables. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
-   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.exportEvaluatedExamplesOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - exportEvaluatedExamplesOperationCallable() { - return stub.exportEvaluatedExamplesOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the - * dataset the model was created from), together with their ground truth annotations and the - * annotations created (predicted) by the model. The examples, ground truth and predictions are - * exported in the state they were at the moment the model was evaluated. - * - *

This export is available only for 30 days since the model evaluation is created. - * - *

Currently only available for Tables. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
-   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = autoMlClient.exportEvaluatedExamplesCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable - exportEvaluatedExamplesCallable() { - return stub.exportEvaluatedExamplesCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists model evaluations. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param parent Required. Resource name of the model to list the model evaluations for. If - * modelId is set as "-", this will list model evaluations from across all models of the - * parent location. - * @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 model evaluations. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param parent Required. Resource name of the model to list the model evaluations for. If - * modelId is set as "-", this will list model evaluations from across all models of the - * parent location. - * @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 model evaluations. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListModelEvaluationsPagedResponse listModelEvaluations( - ListModelEvaluationsRequest request) { - return listModelEvaluationsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists model evaluations. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListModelEvaluationsResponse response = autoMlClient.listModelEvaluationsCallable().call(request);
-   *     for (ModelEvaluation element : response.getModelEvaluationList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - listModelEvaluationsCallable() { - return stub.listModelEvaluationsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates a dataset. - * - *

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListDatasetsRequest request = ListDatasetsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListDatasetsResponse response = autoMlClient.listDatasetsCallable().call(request);
-   *     for (Dataset element : response.getDatasetsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable listDatasetsCallable() { - return stub.listDatasetsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a dataset. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   Dataset dataset = Dataset.newBuilder().build();
-   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder()
-   *     .setDataset(dataset)
-   *     .build();
-   *   Dataset response = autoMlClient.updateDataset(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Dataset updateDataset(UpdateDatasetRequest request) { - return updateDatasetCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a dataset. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
-   *   AnnotationSpec response = autoMlClient.getAnnotationSpec(name);
-   * }
-   * 
- * - * @param name Required. The resource name of the annotation spec to retrieve. - * @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 annotation spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
-   *   AnnotationSpec response = autoMlClient.getAnnotationSpec(name.toString());
-   * }
-   * 
- * - * @param name Required. The resource name of the annotation spec to retrieve. - * @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 annotation spec. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
-   *   GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<AnnotationSpec> future = autoMlClient.getAnnotationSpecCallable().futureCall(request);
-   *   // Do something
-   *   AnnotationSpec response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable getAnnotationSpecCallable() { - return stub.getAnnotationSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets a table spec. - * - *

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
-   *   GetTableSpecRequest request = GetTableSpecRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   TableSpec response = autoMlClient.getTableSpec(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final TableSpec getTableSpec(GetTableSpecRequest request) { - return getTableSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
-   *   GetTableSpecRequest request = GetTableSpecRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<TableSpec> future = autoMlClient.getTableSpecCallable().futureCall(request);
-   *   // Do something
-   *   TableSpec response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable getTableSpecCallable() { - return stub.getTableSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists table specs in a dataset. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   for (TableSpec element : autoMlClient.listTableSpecs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param parent Required. The resource name of the dataset to list table specs from. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListTableSpecsPagedResponse listTableSpecs(DatasetName parent) { - ListTableSpecsRequest request = - ListTableSpecsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listTableSpecs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists table specs in a dataset. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   for (TableSpec element : autoMlClient.listTableSpecs(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param parent Required. The resource name of the dataset to list table specs from. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListTableSpecsPagedResponse listTableSpecs(String parent) { - ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder().setParent(parent).build(); - return listTableSpecs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists table specs in a dataset. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (TableSpec element : autoMlClient.listTableSpecs(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListTableSpecsPagedResponse listTableSpecs(ListTableSpecsRequest request) { - return listTableSpecsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists table specs in a dataset. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListTableSpecsPagedResponse> future = autoMlClient.listTableSpecsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (TableSpec element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - listTableSpecsPagedCallable() { - return stub.listTableSpecsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists table specs in a dataset. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
-   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListTableSpecsResponse response = autoMlClient.listTableSpecsCallable().call(request);
-   *     for (TableSpec element : response.getTableSpecsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - listTableSpecsCallable() { - return stub.listTableSpecsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpec tableSpec = TableSpec.newBuilder().build();
-   *   TableSpec response = autoMlClient.updateTableSpec(tableSpec);
-   * }
-   * 
- * - * @param tableSpec Required. The table spec which replaces the resource on the server. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final TableSpec updateTableSpec(TableSpec tableSpec) { - UpdateTableSpecRequest request = - UpdateTableSpecRequest.newBuilder().setTableSpec(tableSpec).build(); - return updateTableSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpec tableSpec = TableSpec.newBuilder().build();
-   *   UpdateTableSpecRequest request = UpdateTableSpecRequest.newBuilder()
-   *     .setTableSpec(tableSpec)
-   *     .build();
-   *   TableSpec response = autoMlClient.updateTableSpec(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final TableSpec updateTableSpec(UpdateTableSpecRequest request) { - return updateTableSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpec tableSpec = TableSpec.newBuilder().build();
-   *   UpdateTableSpecRequest request = UpdateTableSpecRequest.newBuilder()
-   *     .setTableSpec(tableSpec)
-   *     .build();
-   *   ApiFuture<TableSpec> future = autoMlClient.updateTableSpecCallable().futureCall(request);
-   *   // Do something
-   *   TableSpec response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable updateTableSpecCallable() { - return stub.updateTableSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets a column spec. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ColumnSpecName name = ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
-   *   ColumnSpec response = autoMlClient.getColumnSpec(name.toString());
-   * }
-   * 
- * - * @param name Required. The resource name of the column spec to retrieve. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ColumnSpec getColumnSpec(String name) { - GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder().setName(name).build(); - return getColumnSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets a column spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ColumnSpecName name = ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
-   *   GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ColumnSpec response = autoMlClient.getColumnSpec(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ColumnSpec getColumnSpec(GetColumnSpecRequest request) { - return getColumnSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Gets a column spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ColumnSpecName name = ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
-   *   GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<ColumnSpec> future = autoMlClient.getColumnSpecCallable().futureCall(request);
-   *   // Do something
-   *   ColumnSpec response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable getColumnSpecCallable() { - return stub.getColumnSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists column specs in a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
-   *   for (ColumnSpec element : autoMlClient.listColumnSpecs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param parent Required. The resource name of the table spec to list column specs from. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListColumnSpecsPagedResponse listColumnSpecs(TableSpecName parent) { - ListColumnSpecsRequest request = - ListColumnSpecsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listColumnSpecs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists column specs in a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
-   *   for (ColumnSpec element : autoMlClient.listColumnSpecs(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param parent Required. The resource name of the table spec to list column specs from. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListColumnSpecsPagedResponse listColumnSpecs(String parent) { - ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder().setParent(parent).build(); - return listColumnSpecs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists column specs in a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
-   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (ColumnSpec element : autoMlClient.listColumnSpecs(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListColumnSpecsPagedResponse listColumnSpecs(ListColumnSpecsRequest request) { - return listColumnSpecsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists column specs in a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
-   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   ApiFuture<ListColumnSpecsPagedResponse> future = autoMlClient.listColumnSpecsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (ColumnSpec element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - listColumnSpecsPagedCallable() { - return stub.listColumnSpecsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists column specs in a table spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
-   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListColumnSpecsResponse response = autoMlClient.listColumnSpecsCallable().call(request);
-   *     for (ColumnSpec element : response.getColumnSpecsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable - listColumnSpecsCallable() { - return stub.listColumnSpecsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a column spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
-   *   ColumnSpec response = autoMlClient.updateColumnSpec(columnSpec);
-   * }
-   * 
- * - * @param columnSpec Required. The column spec which replaces the resource on the server. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ColumnSpec updateColumnSpec(ColumnSpec columnSpec) { - UpdateColumnSpecRequest request = - UpdateColumnSpecRequest.newBuilder().setColumnSpec(columnSpec).build(); - return updateColumnSpec(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a column spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
-   *   UpdateColumnSpecRequest request = UpdateColumnSpecRequest.newBuilder()
-   *     .setColumnSpec(columnSpec)
-   *     .build();
-   *   ColumnSpec response = autoMlClient.updateColumnSpec(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ColumnSpec updateColumnSpec(UpdateColumnSpecRequest request) { - return updateColumnSpecCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Updates a column spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
-   *   UpdateColumnSpecRequest request = UpdateColumnSpecRequest.newBuilder()
-   *     .setColumnSpec(columnSpec)
-   *     .build();
-   *   ApiFuture<ColumnSpec> future = autoMlClient.updateColumnSpecCallable().futureCall(request);
-   *   // Do something
-   *   ColumnSpec response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable updateColumnSpecCallable() { - return stub.updateColumnSpecCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field - * when it completes. When you create a model, several model evaluations are created for it: a - * global evaluation, and one evaluation for each annotation spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Model model = Model.newBuilder().build();
-   *   Model response = autoMlClient.createModelAsync(parent, model).get();
-   * }
-   * 
- * - * @param parent Required. Resource name of the parent project where the model is being created. - * @param model Required. The model to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture createModelAsync( - LocationName parent, Model model) { - CreateModelRequest request = - CreateModelRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setModel(model) - .build(); - return createModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field - * when it completes. When you create a model, several model evaluations are created for it: a - * global evaluation, and one evaluation for each annotation spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Model model = Model.newBuilder().build();
-   *   Model response = autoMlClient.createModelAsync(parent.toString(), model).get();
-   * }
-   * 
- * - * @param parent Required. Resource name of the parent project where the model is being created. - * @param model Required. The model to create. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture createModelAsync( - String parent, Model model) { - CreateModelRequest request = - CreateModelRequest.newBuilder().setParent(parent).setModel(model).build(); - return createModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field - * when it completes. When you create a model, several model evaluations are created for it: a - * global evaluation, and one evaluation for each annotation spec. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   Model model = Model.newBuilder().build();
-   *   CreateModelRequest request = CreateModelRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .setModel(model)
-   *     .build();
-   *   Model response = autoMlClient.createModelAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture createModelAsync( - CreateModelRequest request) { - return createModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Creates a model. Returns a Model in the [response][google.longrunning.Operation.response] field - * when it completes. When you create a model, several model evaluations are created for it: a - * global evaluation, and one evaluation for each annotation spec. - * - *

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListModelsRequest request = ListModelsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   for (Model element : autoMlClient.listModels(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListModelsPagedResponse listModels(ListModelsRequest request) { - return listModelsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Lists models. - * - *

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
-   *   ListModelsRequest request = ListModelsRequest.newBuilder()
-   *     .setParent(parent.toString())
-   *     .build();
-   *   while (true) {
-   *     ListModelsResponse response = autoMlClient.listModelsCallable().call(request);
-   *     for (Model element : response.getModelList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * 
- */ - public final UnaryCallable listModelsCallable() { - return stub.listModelsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deploys a model. If a model is already deployed, deploying it with the same parameters has no - * effect. Deploying with different parametrs (as e.g. changing - * - *

[node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - * will reset the deployment state without pausing the model's availability. - * - *

Only applicable for Text Classification, Image Object Detection , Tables, and Image - * Segmentation; all other domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   autoMlClient.deployModelAsync(name).get();
-   * }
-   * 
- * - * @param name Required. Resource name of the model to deploy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deployModelAsync(ModelName name) { - DeployModelRequest request = - DeployModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deploys a model. If a model is already deployed, deploying it with the same parameters has no - * effect. Deploying with different parametrs (as e.g. changing - * - *

[node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - * will reset the deployment state without pausing the model's availability. - * - *

Only applicable for Text Classification, Image Object Detection , Tables, and Image - * Segmentation; all other domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   autoMlClient.deployModelAsync(name.toString()).get();
-   * }
-   * 
- * - * @param name Required. Resource name of the model to deploy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deployModelAsync(String name) { - DeployModelRequest request = DeployModelRequest.newBuilder().setName(name).build(); - return deployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deploys a model. If a model is already deployed, deploying it with the same parameters has no - * effect. Deploying with different parametrs (as e.g. changing - * - *

[node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - * will reset the deployment state without pausing the model's availability. - * - *

Only applicable for Text Classification, Image Object Detection , Tables, and Image - * Segmentation; all other domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeployModelRequest request = DeployModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   autoMlClient.deployModelAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture deployModelAsync( - DeployModelRequest request) { - return deployModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deploys a model. If a model is already deployed, deploying it with the same parameters has no - * effect. Deploying with different parametrs (as e.g. changing - * - *

[node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - * will reset the deployment state without pausing the model's availability. - * - *

Only applicable for Text Classification, Image Object Detection , Tables, and Image - * Segmentation; all other domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeployModelRequest request = DeployModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.deployModelOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - deployModelOperationCallable() { - return stub.deployModelOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Deploys a model. If a model is already deployed, deploying it with the same parameters has no - * effect. Deploying with different parametrs (as e.g. changing - * - *

[node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - * will reset the deployment state without pausing the model's availability. - * - *

Only applicable for Text Classification, Image Object Detection , Tables, and Image - * Segmentation; all other domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   DeployModelRequest request = DeployModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<Operation> future = autoMlClient.deployModelCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - public final UnaryCallable deployModelCallable() { - return stub.deployModelCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * - *

Only applicable for Text Classification, Image Object Detection and Tables; all other - * domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   autoMlClient.undeployModelAsync(name).get();
-   * }
-   * 
- * - * @param name Required. Resource name of the model to undeploy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture undeployModelAsync(ModelName name) { - UndeployModelRequest request = - UndeployModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return undeployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * - *

Only applicable for Text Classification, Image Object Detection and Tables; all other - * domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   autoMlClient.undeployModelAsync(name.toString()).get();
-   * }
-   * 
- * - * @param name Required. Resource name of the model to undeploy. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture undeployModelAsync(String name) { - UndeployModelRequest request = UndeployModelRequest.newBuilder().setName(name).build(); - return undeployModelAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * - *

Only applicable for Text Classification, Image Object Detection and Tables; all other - * domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   UndeployModelRequest request = UndeployModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   autoMlClient.undeployModelAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture undeployModelAsync( - UndeployModelRequest request) { - return undeployModelOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * - *

Only applicable for Text Classification, Image Object Detection and Tables; all other - * domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   UndeployModelRequest request = UndeployModelRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.undeployModelOperationCallable().futureCall(request);
-   *   // Do something
-   *   future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - undeployModelOperationCallable() { - return stub.undeployModelOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Undeploys a model. If the model is not deployed this method has no effect. - * - *

Only applicable for Text Classification, Image Object Detection and Tables; all other - * domains manage deployment automatically. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. - * - *

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


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

Sample code: - * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelEvaluationName name = ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]");
-   *   GetModelEvaluationRequest request = GetModelEvaluationRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .build();
-   *   ApiFuture<ModelEvaluation> future = autoMlClient.getModelEvaluationCallable().futureCall(request);
-   *   // Do something
-   *   ModelEvaluation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable - getModelEvaluationCallable() { - return stub.getModelEvaluationCallable(); - } - - @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 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 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 ListTableSpecsPagedResponse - extends AbstractPagedListResponse< - ListTableSpecsRequest, - ListTableSpecsResponse, - TableSpec, - ListTableSpecsPage, - ListTableSpecsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListTableSpecsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListTableSpecsPagedResponse apply(ListTableSpecsPage input) { - return new ListTableSpecsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private ListTableSpecsPagedResponse(ListTableSpecsPage page) { - super(page, ListTableSpecsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListTableSpecsPage - extends AbstractPage< - ListTableSpecsRequest, ListTableSpecsResponse, TableSpec, ListTableSpecsPage> { - - private ListTableSpecsPage( - PageContext context, - ListTableSpecsResponse response) { - super(context, response); - } - - private static ListTableSpecsPage createEmptyPage() { - return new ListTableSpecsPage(null, null); - } - - @Override - protected ListTableSpecsPage createPage( - PageContext context, - ListTableSpecsResponse response) { - return new ListTableSpecsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListTableSpecsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListTableSpecsRequest, - ListTableSpecsResponse, - TableSpec, - ListTableSpecsPage, - ListTableSpecsFixedSizeCollection> { - - private ListTableSpecsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListTableSpecsFixedSizeCollection createEmptyCollection() { - return new ListTableSpecsFixedSizeCollection(null, 0); - } - - @Override - protected ListTableSpecsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListTableSpecsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListColumnSpecsPagedResponse - extends AbstractPagedListResponse< - ListColumnSpecsRequest, - ListColumnSpecsResponse, - ColumnSpec, - ListColumnSpecsPage, - ListColumnSpecsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListColumnSpecsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListColumnSpecsPagedResponse apply(ListColumnSpecsPage input) { - return new ListColumnSpecsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private ListColumnSpecsPagedResponse(ListColumnSpecsPage page) { - super(page, ListColumnSpecsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListColumnSpecsPage - extends AbstractPage< - ListColumnSpecsRequest, ListColumnSpecsResponse, ColumnSpec, ListColumnSpecsPage> { - - private ListColumnSpecsPage( - PageContext context, - ListColumnSpecsResponse response) { - super(context, response); - } - - private static ListColumnSpecsPage createEmptyPage() { - return new ListColumnSpecsPage(null, null); - } - - @Override - protected ListColumnSpecsPage createPage( - PageContext context, - ListColumnSpecsResponse response) { - return new ListColumnSpecsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListColumnSpecsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListColumnSpecsRequest, - ListColumnSpecsResponse, - ColumnSpec, - ListColumnSpecsPage, - ListColumnSpecsFixedSizeCollection> { - - private ListColumnSpecsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListColumnSpecsFixedSizeCollection createEmptyCollection() { - return new ListColumnSpecsFixedSizeCollection(null, 0); - } - - @Override - protected ListColumnSpecsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListColumnSpecsFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListModelsPagedResponse - extends AbstractPagedListResponse< - ListModelsRequest, - ListModelsResponse, - Model, - ListModelsPage, - ListModelsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListModelsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - new ApiFunction() { - @Override - public ListModelsPagedResponse apply(ListModelsPage input) { - return new ListModelsPagedResponse(input); - } - }, - MoreExecutors.directExecutor()); - } - - private ListModelsPagedResponse(ListModelsPage page) { - super(page, ListModelsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListModelsPage - extends AbstractPage { - - private ListModelsPage( - PageContext context, - ListModelsResponse response) { - super(context, response); - } - - private static ListModelsPage createEmptyPage() { - return new ListModelsPage(null, null); - } - - @Override - protected ListModelsPage createPage( - PageContext context, - ListModelsResponse response) { - return new ListModelsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListModelsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListModelsRequest, - ListModelsResponse, - Model, - ListModelsPage, - ListModelsFixedSizeCollection> { - - private ListModelsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListModelsFixedSizeCollection createEmptyCollection() { - return new ListModelsFixedSizeCollection(null, 0); - } - - @Override - protected ListModelsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListModelsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlSettings.java deleted file mode 100644 index 12ed7303f..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlSettings.java +++ /dev/null @@ -1,589 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListColumnSpecsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListDatasetsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelEvaluationsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListTableSpecsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.automl.v1beta1.stub.AutoMlStubSettings; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * Settings class to configure an instance of {@link AutoMlClient}. - * - *

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

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

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

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

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

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to deleteDataset. */ - public UnaryCallSettings.Builder deleteDatasetSettings() { - return getStubSettingsBuilder().deleteDatasetSettings(); - } - - /** Returns the builder for the settings used for calls to deleteDataset. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteDatasetOperationSettings() { - return getStubSettingsBuilder().deleteDatasetOperationSettings(); - } - - /** Returns the builder for the settings used for calls to importData. */ - public UnaryCallSettings.Builder importDataSettings() { - return getStubSettingsBuilder().importDataSettings(); - } - - /** Returns the builder for the settings used for calls to importData. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - importDataOperationSettings() { - return getStubSettingsBuilder().importDataOperationSettings(); - } - - /** Returns the builder for the settings used for calls to exportData. */ - public UnaryCallSettings.Builder exportDataSettings() { - return getStubSettingsBuilder().exportDataSettings(); - } - - /** Returns the builder for the settings used for calls to exportData. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportDataOperationSettings() { - return getStubSettingsBuilder().exportDataOperationSettings(); - } - - /** Returns the builder for the settings used for calls to deleteModel. */ - public UnaryCallSettings.Builder deleteModelSettings() { - return getStubSettingsBuilder().deleteModelSettings(); - } - - /** Returns the builder for the settings used for calls to deleteModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteModelOperationSettings() { - return getStubSettingsBuilder().deleteModelOperationSettings(); - } - - /** Returns the builder for the settings used for calls to exportModel. */ - public UnaryCallSettings.Builder exportModelSettings() { - return getStubSettingsBuilder().exportModelSettings(); - } - - /** Returns the builder for the settings used for calls to exportModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportModelOperationSettings() { - return getStubSettingsBuilder().exportModelOperationSettings(); - } - - /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */ - public UnaryCallSettings.Builder - exportEvaluatedExamplesSettings() { - return getStubSettingsBuilder().exportEvaluatedExamplesSettings(); - } - - /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportEvaluatedExamplesOperationSettings() { - return getStubSettingsBuilder().exportEvaluatedExamplesOperationSettings(); - } - - /** 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 createDataset. */ - public UnaryCallSettings.Builder createDatasetSettings() { - return getStubSettingsBuilder().createDatasetSettings(); - } - - /** Returns the builder for the settings used for calls to getDataset. */ - public UnaryCallSettings.Builder getDatasetSettings() { - return getStubSettingsBuilder().getDatasetSettings(); - } - - /** Returns the builder for the settings used for calls to listDatasets. */ - public PagedCallSettings.Builder< - ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> - listDatasetsSettings() { - return getStubSettingsBuilder().listDatasetsSettings(); - } - - /** Returns the builder for the settings used for calls to updateDataset. */ - public UnaryCallSettings.Builder updateDatasetSettings() { - return getStubSettingsBuilder().updateDatasetSettings(); - } - - /** 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 getTableSpec. */ - public UnaryCallSettings.Builder getTableSpecSettings() { - return getStubSettingsBuilder().getTableSpecSettings(); - } - - /** Returns the builder for the settings used for calls to listTableSpecs. */ - public PagedCallSettings.Builder< - ListTableSpecsRequest, ListTableSpecsResponse, ListTableSpecsPagedResponse> - listTableSpecsSettings() { - return getStubSettingsBuilder().listTableSpecsSettings(); - } - - /** Returns the builder for the settings used for calls to updateTableSpec. */ - public UnaryCallSettings.Builder updateTableSpecSettings() { - return getStubSettingsBuilder().updateTableSpecSettings(); - } - - /** Returns the builder for the settings used for calls to getColumnSpec. */ - public UnaryCallSettings.Builder getColumnSpecSettings() { - return getStubSettingsBuilder().getColumnSpecSettings(); - } - - /** Returns the builder for the settings used for calls to listColumnSpecs. */ - public PagedCallSettings.Builder< - ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse> - listColumnSpecsSettings() { - return getStubSettingsBuilder().listColumnSpecsSettings(); - } - - /** Returns the builder for the settings used for calls to updateColumnSpec. */ - public UnaryCallSettings.Builder - updateColumnSpecSettings() { - return getStubSettingsBuilder().updateColumnSpecSettings(); - } - - /** Returns the builder for the settings used for calls to createModel. */ - public UnaryCallSettings.Builder createModelSettings() { - return getStubSettingsBuilder().createModelSettings(); - } - - /** Returns the builder for the settings used for calls to createModel. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createModelOperationSettings() { - return getStubSettingsBuilder().createModelOperationSettings(); - } - - /** Returns the builder for the settings used for calls to getModel. */ - public UnaryCallSettings.Builder getModelSettings() { - return getStubSettingsBuilder().getModelSettings(); - } - - /** Returns the builder for the settings used for calls to listModels. */ - public PagedCallSettings.Builder - listModelsSettings() { - return getStubSettingsBuilder().listModelsSettings(); - } - - /** 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - 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. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - undeployModelOperationSettings() { - return getStubSettingsBuilder().undeployModelOperationSettings(); - } - - /** Returns the builder for the settings used for calls to getModelEvaluation. */ - public UnaryCallSettings.Builder - getModelEvaluationSettings() { - return getStubSettingsBuilder().getModelEvaluationSettings(); - } - - @Override - public AutoMlSettings build() throws IOException { - return new AutoMlSettings(this); - } - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceClient.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceClient.java deleted file mode 100644 index c4a45777f..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceClient.java +++ /dev/null @@ -1,673 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -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.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.automl.v1beta1.stub.PredictionServiceStub; -import com.google.cloud.automl.v1beta1.stub.PredictionServiceStubSettings; -import com.google.longrunning.Operation; -import com.google.longrunning.OperationsClient; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND SERVICE -/** - * Service Description: AutoML Prediction API. - * - *

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

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

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

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

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

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

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

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

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

To customize credentials: - * - *

- * 
- * PredictionServiceSettings predictionServiceSettings =
- *     PredictionServiceSettings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * PredictionServiceClient predictionServiceClient =
- *     PredictionServiceClient.create(predictionServiceSettings);
- * 
- * 
- * - * To customize the endpoint: - * - *
- * 
- * PredictionServiceSettings predictionServiceSettings =
- *     PredictionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * PredictionServiceClient predictionServiceClient =
- *     PredictionServiceClient.create(predictionServiceSettings);
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -public class PredictionServiceClient implements BackgroundResource { - private final PredictionServiceSettings settings; - private final PredictionServiceStub stub; - private final OperationsClient operationsClient; - - /** Constructs an instance of PredictionServiceClient with default settings. */ - public static final PredictionServiceClient create() throws IOException { - return create(PredictionServiceSettings.newBuilder().build()); - } - - /** - * Constructs an instance of PredictionServiceClient, using the given settings. The channels are - * created based on the settings passed in, or defaults for any settings that are not set. - */ - public static final PredictionServiceClient create(PredictionServiceSettings settings) - throws IOException { - return new PredictionServiceClient(settings); - } - - /** - * Constructs an instance of PredictionServiceClient, using the given stub for making calls. This - * is for advanced usage - prefer to use PredictionServiceSettings}. - */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public static final PredictionServiceClient create(PredictionServiceStub stub) { - return new PredictionServiceClient(stub); - } - - /** - * Constructs an instance of PredictionServiceClient, using the given settings. This is protected - * so that it is easy to make a subclass, but otherwise, the static factory methods should be - * preferred. - */ - protected PredictionServiceClient(PredictionServiceSettings settings) throws IOException { - this.settings = settings; - this.stub = ((PredictionServiceStubSettings) settings.getStubSettings()).createStub(); - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - @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; - this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); - } - - 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; - } - - /** - * Returns the OperationsClient that can be used to query the status of a long-running operation - * returned by another API method call. - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationsClient getOperationsClient() { - return operationsClient; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform an online prediction. The prediction result will be directly returned in the response. - * Available for following ML problems, and their expected request payloads: * Image - * Classification - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Image - * Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Text - * Classification - TextSnippet, content up to 60,000 characters, UTF-8 encoded. * Text - * Extraction - TextSnippet, content up to 30,000 characters, UTF-8 NFC encoded. * Translation - * - TextSnippet, content up to 25,000 characters, UTF-8 encoded. * Tables - Row, with column - * values matching the columns of the model, up to 5MB. Not available for FORECASTING - * - *

[prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. * - * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 encoded. - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
-   *   Map<String, String> params = new HashMap<>();
-   *   PredictResponse response = predictionServiceClient.predict(name, payload, params);
-   * }
-   * 
- * - * @param name Required. Name of the model requested to serve the prediction. - * @param payload Required. Payload to perform a prediction on. The payload must match the problem - * type that the model was trained to solve. - * @param params Additional domain-specific parameters, any string must be up to 25000 characters - * long. - *

* For Image Classification: - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for an image, it will only produce results that have at least this confidence score. The - * default is 0.5. - *

* For Image Object Detection: `score_threshold` - (float) When Model detects objects - * on the image, it will only produce bounding boxes which have at least this confidence - * score. Value in 0 to 1 range, default is 0.5. `max_bounding_box_count` - (int64) No more - * than this number of bounding boxes will be returned in the response. Default is 100, the - * requested value may be limited by server. * For Tables: - * feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should - * be populated in the returned TablesAnnotation. The default is false. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final PredictResponse predict( - ModelName name, ExamplePayload payload, Map params) { - PredictRequest request = - PredictRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setPayload(payload) - .putAllParams(params) - .build(); - return predict(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform an online prediction. The prediction result will be directly returned in the response. - * Available for following ML problems, and their expected request payloads: * Image - * Classification - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Image - * Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Text - * Classification - TextSnippet, content up to 60,000 characters, UTF-8 encoded. * Text - * Extraction - TextSnippet, content up to 30,000 characters, UTF-8 NFC encoded. * Translation - * - TextSnippet, content up to 25,000 characters, UTF-8 encoded. * Tables - Row, with column - * values matching the columns of the model, up to 5MB. Not available for FORECASTING - * - *

[prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. * - * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 encoded. - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
-   *   Map<String, String> params = new HashMap<>();
-   *   PredictResponse response = predictionServiceClient.predict(name.toString(), payload, params);
-   * }
-   * 
- * - * @param name Required. Name of the model requested to serve the prediction. - * @param payload Required. Payload to perform a prediction on. The payload must match the problem - * type that the model was trained to solve. - * @param params Additional domain-specific parameters, any string must be up to 25000 characters - * long. - *

* For Image Classification: - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for an image, it will only produce results that have at least this confidence score. The - * default is 0.5. - *

* For Image Object Detection: `score_threshold` - (float) When Model detects objects - * on the image, it will only produce bounding boxes which have at least this confidence - * score. Value in 0 to 1 range, default is 0.5. `max_bounding_box_count` - (int64) No more - * than this number of bounding boxes will be returned in the response. Default is 100, the - * requested value may be limited by server. * For Tables: - * feature_imp<span>ortan</span>ce - (boolean) Whether feature importance should - * be populated in the returned TablesAnnotation. The default is false. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final PredictResponse predict( - String name, ExamplePayload payload, Map params) { - PredictRequest request = - PredictRequest.newBuilder().setName(name).setPayload(payload).putAllParams(params).build(); - return predict(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform an online prediction. The prediction result will be directly returned in the response. - * Available for following ML problems, and their expected request payloads: * Image - * Classification - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Image - * Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Text - * Classification - TextSnippet, content up to 60,000 characters, UTF-8 encoded. * Text - * Extraction - TextSnippet, content up to 30,000 characters, UTF-8 NFC encoded. * Translation - * - TextSnippet, content up to 25,000 characters, UTF-8 encoded. * Tables - Row, with column - * values matching the columns of the model, up to 5MB. Not available for FORECASTING - * - *

[prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. * - * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 encoded. - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
-   *   PredictRequest request = PredictRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setPayload(payload)
-   *     .build();
-   *   PredictResponse response = predictionServiceClient.predict(request);
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final PredictResponse predict(PredictRequest request) { - return predictCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform an online prediction. The prediction result will be directly returned in the response. - * Available for following ML problems, and their expected request payloads: * Image - * Classification - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Image - * Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes up to 30MB. * Text - * Classification - TextSnippet, content up to 60,000 characters, UTF-8 encoded. * Text - * Extraction - TextSnippet, content up to 30,000 characters, UTF-8 NFC encoded. * Translation - * - TextSnippet, content up to 25,000 characters, UTF-8 encoded. * Tables - Row, with column - * values matching the columns of the model, up to 5MB. Not available for FORECASTING - * - *

[prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. * - * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 encoded. - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ExamplePayload payload = ExamplePayload.newBuilder().build();
-   *   PredictRequest request = PredictRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setPayload(payload)
-   *     .build();
-   *   ApiFuture<PredictResponse> future = predictionServiceClient.predictCallable().futureCall(request);
-   *   // Do something
-   *   PredictResponse response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable predictCallable() { - return stub.predictCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform a batch prediction. Unlike the online - * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't - * be immediately available in the response. Instead, a long running operation object is returned. - * User can poll the operation result via - * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, - * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the - * [response][google.longrunning.Operation.response] field. Available for following ML problems: - * * Image Classification * Image Object Detection * Video Classification * Video - * Object Tracking * Text Extraction * Tables - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
-   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
-   *   Map<String, String> params = new HashMap<>();
-   *   BatchPredictResult response = predictionServiceClient.batchPredictAsync(name, inputConfig, outputConfig, params).get();
-   * }
-   * 
- * - * @param name Required. Name of the model requested to serve the batch prediction. - * @param inputConfig Required. The input configuration for batch prediction. - * @param outputConfig Required. The Configuration specifying where output predictions should be - * written. - * @param params Required. Additional domain-specific parameters for the predictions, any string - * must be up to 25000 characters long. - *

* For Text Classification: - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for a text snippet, it will only produce results that have at least this confidence score. - * The default is 0.5. - *

* For Image Classification: - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for an image, it will only produce results that have at least this confidence score. The - * default is 0.5. - *

* For Image Object Detection: - *

`score_threshold` - (float) When Model detects objects on the image, it will only - * produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, - * default is 0.5. `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be produced per image. Default is 100, the requested value may be limited by - * server. - *

* For Video Classification : - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for a video, it will only produce results that have at least this confidence score. The - * default is 0.5. `segment_classification` - (boolean) Set to true to request segment-level - * classification. AutoML Video Intelligence returns labels and their confidence scores for - * the entire segment of the video that user specified in the request configuration. The - * default is "true". `shot_classification` - (boolean) Set to true to request shot-level - * classification. AutoML Video Intelligence determines the boundaries for each camera shot in - * the entire segment of the video that user specified in the request configuration. AutoML - * Video Intelligence 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 training data, but there are no - * metrics provided to describe that quality. The default is "false". - * `1s_interval_classification` - (boolean) Set to true to request classification for a video - * at one-second intervals. AutoML Video Intelligence returns labels and their confidence - * scores for each second of the entire segment of the video that user specified in the - * request configuration. WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no metrics provided to describe - * that quality. The default is "false". - *

* For Tables: - *

feature_imp<span>ortan</span>ce - (boolean) Whether feature importance - * should be populated in the returned TablesAnnotations. The default is false. - *

* For Video Object Tracking: - *

`score_threshold` - (float) When Model detects objects on video frames, it will only - * produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, - * default is 0.5. `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be returned per frame. Default is 100, the requested value may be limited by - * server. `min_bounding_box_size` - (float) Only bounding boxes with shortest edge at least - * that long as a relative value of video frame size will be returned. Value in 0 to 1 range. - * Default is 0. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchPredictAsync( - ModelName name, - BatchPredictInputConfig inputConfig, - BatchPredictOutputConfig outputConfig, - Map params) { - BatchPredictRequest request = - BatchPredictRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .setInputConfig(inputConfig) - .setOutputConfig(outputConfig) - .putAllParams(params) - .build(); - return batchPredictAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform a batch prediction. Unlike the online - * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't - * be immediately available in the response. Instead, a long running operation object is returned. - * User can poll the operation result via - * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, - * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the - * [response][google.longrunning.Operation.response] field. Available for following ML problems: - * * Image Classification * Image Object Detection * Video Classification * Video - * Object Tracking * Text Extraction * Tables - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
-   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
-   *   Map<String, String> params = new HashMap<>();
-   *   BatchPredictResult response = predictionServiceClient.batchPredictAsync(name.toString(), inputConfig, outputConfig, params).get();
-   * }
-   * 
- * - * @param name Required. Name of the model requested to serve the batch prediction. - * @param inputConfig Required. The input configuration for batch prediction. - * @param outputConfig Required. The Configuration specifying where output predictions should be - * written. - * @param params Required. Additional domain-specific parameters for the predictions, any string - * must be up to 25000 characters long. - *

* For Text Classification: - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for a text snippet, it will only produce results that have at least this confidence score. - * The default is 0.5. - *

* For Image Classification: - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for an image, it will only produce results that have at least this confidence score. The - * default is 0.5. - *

* For Image Object Detection: - *

`score_threshold` - (float) When Model detects objects on the image, it will only - * produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, - * default is 0.5. `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be produced per image. Default is 100, the requested value may be limited by - * server. - *

* For Video Classification : - *

`score_threshold` - (float) A value from 0.0 to 1.0. When the model makes predictions - * for a video, it will only produce results that have at least this confidence score. The - * default is 0.5. `segment_classification` - (boolean) Set to true to request segment-level - * classification. AutoML Video Intelligence returns labels and their confidence scores for - * the entire segment of the video that user specified in the request configuration. The - * default is "true". `shot_classification` - (boolean) Set to true to request shot-level - * classification. AutoML Video Intelligence determines the boundaries for each camera shot in - * the entire segment of the video that user specified in the request configuration. AutoML - * Video Intelligence 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 training data, but there are no - * metrics provided to describe that quality. The default is "false". - * `1s_interval_classification` - (boolean) Set to true to request classification for a video - * at one-second intervals. AutoML Video Intelligence returns labels and their confidence - * scores for each second of the entire segment of the video that user specified in the - * request configuration. WARNING: Model evaluation is not done for this classification type, - * the quality of it depends on training data, but there are no metrics provided to describe - * that quality. The default is "false". - *

* For Tables: - *

feature_imp<span>ortan</span>ce - (boolean) Whether feature importance - * should be populated in the returned TablesAnnotations. The default is false. - *

* For Video Object Tracking: - *

`score_threshold` - (float) When Model detects objects on video frames, it will only - * produce bounding boxes which have at least this confidence score. Value in 0 to 1 range, - * default is 0.5. `max_bounding_box_count` - (int64) No more than this number of bounding - * boxes will be returned per frame. Default is 100, the requested value may be limited by - * server. `min_bounding_box_size` - (float) Only bounding boxes with shortest edge at least - * that long as a relative value of video frame size will be returned. Value in 0 to 1 range. - * Default is 0. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchPredictAsync( - String name, - BatchPredictInputConfig inputConfig, - BatchPredictOutputConfig outputConfig, - Map params) { - BatchPredictRequest request = - BatchPredictRequest.newBuilder() - .setName(name) - .setInputConfig(inputConfig) - .setOutputConfig(outputConfig) - .putAllParams(params) - .build(); - return batchPredictAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform a batch prediction. Unlike the online - * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't - * be immediately available in the response. Instead, a long running operation object is returned. - * User can poll the operation result via - * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, - * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the - * [response][google.longrunning.Operation.response] field. Available for following ML problems: - * * Image Classification * Image Object Detection * Video Classification * Video - * Object Tracking * Text Extraction * Tables - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
-   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
-   *   Map<String, String> params = new HashMap<>();
-   *   BatchPredictRequest request = BatchPredictRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setInputConfig(inputConfig)
-   *     .setOutputConfig(outputConfig)
-   *     .putAllParams(params)
-   *     .build();
-   *   BatchPredictResult response = predictionServiceClient.batchPredictAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture batchPredictAsync( - BatchPredictRequest request) { - return batchPredictOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform a batch prediction. Unlike the online - * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't - * be immediately available in the response. Instead, a long running operation object is returned. - * User can poll the operation result via - * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, - * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the - * [response][google.longrunning.Operation.response] field. Available for following ML problems: - * * Image Classification * Image Object Detection * Video Classification * Video - * Object Tracking * Text Extraction * Tables - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
-   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
-   *   Map<String, String> params = new HashMap<>();
-   *   BatchPredictRequest request = BatchPredictRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setInputConfig(inputConfig)
-   *     .setOutputConfig(outputConfig)
-   *     .putAllParams(params)
-   *     .build();
-   *   OperationFuture<BatchPredictResult, OperationMetadata> future = predictionServiceClient.batchPredictOperationCallable().futureCall(request);
-   *   // Do something
-   *   BatchPredictResult response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - batchPredictOperationCallable() { - return stub.batchPredictOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Perform a batch prediction. Unlike the online - * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't - * be immediately available in the response. Instead, a long running operation object is returned. - * User can poll the operation result via - * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, - * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the - * [response][google.longrunning.Operation.response] field. Available for following ML problems: - * * Image Classification * Image Object Detection * Video Classification * Video - * Object Tracking * Text Extraction * Tables - * - *

Sample code: - * - *


-   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
-   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
-   *   Map<String, String> params = new HashMap<>();
-   *   BatchPredictRequest request = BatchPredictRequest.newBuilder()
-   *     .setName(name.toString())
-   *     .setInputConfig(inputConfig)
-   *     .setOutputConfig(outputConfig)
-   *     .putAllParams(params)
-   *     .build();
-   *   ApiFuture<Operation> future = predictionServiceClient.batchPredictCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable batchPredictCallable() { - return stub.batchPredictCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceSettings.java deleted file mode 100644 index bcd232ddc..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceSettings.java +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -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.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.automl.v1beta1.stub.PredictionServiceStubSettings; -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 PredictionServiceClient}. - * - *

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

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

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

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

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

Note: This method does not support applying settings to streaming methods. - */ - public Builder applyToAllUnaryMethods( - ApiFunction, Void> settingsUpdater) throws Exception { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to predict. */ - public UnaryCallSettings.Builder predictSettings() { - return getStubSettingsBuilder().predictSettings(); - } - - /** Returns the builder for the settings used for calls to batchPredict. */ - public UnaryCallSettings.Builder batchPredictSettings() { - return getStubSettingsBuilder().batchPredictSettings(); - } - - /** Returns the builder for the settings used for calls to batchPredict. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - batchPredictOperationSettings() { - return getStubSettingsBuilder().batchPredictOperationSettings(); - } - - @Override - public PredictionServiceSettings build() throws IOException { - return new PredictionServiceSettings(this); - } - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/package-info.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/package-info.java deleted file mode 100644 index 4129cd412..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/package-info.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Cloud AutoML API. - * - *

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

======================= PredictionServiceClient ======================= - * - *

Service Description: AutoML Prediction API. - * - *

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

Sample for PredictionServiceClient: - * - *

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

Service Description: AutoML Server API. - * - *

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

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

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

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

Sample for AutoMlClient: - * - *

- * 
- * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
- *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- *   Dataset dataset = Dataset.newBuilder().build();
- *   Dataset response = autoMlClient.createDataset(parent, dataset);
- * }
- * 
- * 
- */ -@Generated("by gapic-generator") -package com.google.cloud.automl.v1beta1; - -import javax.annotation.Generated; diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStub.java deleted file mode 100644 index 20f0040ea..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStub.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.stub; - -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListColumnSpecsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListDatasetsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelEvaluationsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListTableSpecsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.automl.v1beta1.AnnotationSpec; -import com.google.cloud.automl.v1beta1.ColumnSpec; -import com.google.cloud.automl.v1beta1.CreateDatasetRequest; -import com.google.cloud.automl.v1beta1.CreateModelRequest; -import com.google.cloud.automl.v1beta1.Dataset; -import com.google.cloud.automl.v1beta1.DeleteDatasetRequest; -import com.google.cloud.automl.v1beta1.DeleteModelRequest; -import com.google.cloud.automl.v1beta1.DeployModelRequest; -import com.google.cloud.automl.v1beta1.ExportDataRequest; -import com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; -import com.google.cloud.automl.v1beta1.ExportModelRequest; -import com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest; -import com.google.cloud.automl.v1beta1.GetColumnSpecRequest; -import com.google.cloud.automl.v1beta1.GetDatasetRequest; -import com.google.cloud.automl.v1beta1.GetModelEvaluationRequest; -import com.google.cloud.automl.v1beta1.GetModelRequest; -import com.google.cloud.automl.v1beta1.GetTableSpecRequest; -import com.google.cloud.automl.v1beta1.ImportDataRequest; -import com.google.cloud.automl.v1beta1.ListColumnSpecsRequest; -import com.google.cloud.automl.v1beta1.ListColumnSpecsResponse; -import com.google.cloud.automl.v1beta1.ListDatasetsRequest; -import com.google.cloud.automl.v1beta1.ListDatasetsResponse; -import com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest; -import com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse; -import com.google.cloud.automl.v1beta1.ListModelsRequest; -import com.google.cloud.automl.v1beta1.ListModelsResponse; -import com.google.cloud.automl.v1beta1.ListTableSpecsRequest; -import com.google.cloud.automl.v1beta1.ListTableSpecsResponse; -import com.google.cloud.automl.v1beta1.Model; -import com.google.cloud.automl.v1beta1.ModelEvaluation; -import com.google.cloud.automl.v1beta1.OperationMetadata; -import com.google.cloud.automl.v1beta1.TableSpec; -import com.google.cloud.automl.v1beta1.UndeployModelRequest; -import com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest; -import com.google.cloud.automl.v1beta1.UpdateDatasetRequest; -import com.google.cloud.automl.v1beta1.UpdateTableSpecRequest; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * Base stub class for Cloud AutoML API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class AutoMlStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteDatasetOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteDatasetOperationCallable()"); - } - - public UnaryCallable deleteDatasetCallable() { - throw new UnsupportedOperationException("Not implemented: deleteDatasetCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - importDataOperationCallable() { - throw new UnsupportedOperationException("Not implemented: importDataOperationCallable()"); - } - - public UnaryCallable importDataCallable() { - throw new UnsupportedOperationException("Not implemented: importDataCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportDataOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportDataOperationCallable()"); - } - - public UnaryCallable exportDataCallable() { - throw new UnsupportedOperationException("Not implemented: exportDataCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteModelOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deleteModelOperationCallable()"); - } - - public UnaryCallable deleteModelCallable() { - throw new UnsupportedOperationException("Not implemented: deleteModelCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportModelOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportModelOperationCallable()"); - } - - public UnaryCallable exportModelCallable() { - throw new UnsupportedOperationException("Not implemented: exportModelCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportEvaluatedExamplesOperationCallable() { - throw new UnsupportedOperationException( - "Not implemented: exportEvaluatedExamplesOperationCallable()"); - } - - public UnaryCallable - exportEvaluatedExamplesCallable() { - throw new UnsupportedOperationException("Not implemented: exportEvaluatedExamplesCallable()"); - } - - public UnaryCallable - listModelEvaluationsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listModelEvaluationsPagedCallable()"); - } - - public UnaryCallable - listModelEvaluationsCallable() { - throw new UnsupportedOperationException("Not implemented: listModelEvaluationsCallable()"); - } - - public UnaryCallable createDatasetCallable() { - throw new UnsupportedOperationException("Not implemented: createDatasetCallable()"); - } - - public UnaryCallable getDatasetCallable() { - throw new UnsupportedOperationException("Not implemented: getDatasetCallable()"); - } - - public UnaryCallable listDatasetsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listDatasetsPagedCallable()"); - } - - public UnaryCallable listDatasetsCallable() { - throw new UnsupportedOperationException("Not implemented: listDatasetsCallable()"); - } - - public UnaryCallable updateDatasetCallable() { - throw new UnsupportedOperationException("Not implemented: updateDatasetCallable()"); - } - - public UnaryCallable getAnnotationSpecCallable() { - throw new UnsupportedOperationException("Not implemented: getAnnotationSpecCallable()"); - } - - public UnaryCallable getTableSpecCallable() { - throw new UnsupportedOperationException("Not implemented: getTableSpecCallable()"); - } - - public UnaryCallable - listTableSpecsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listTableSpecsPagedCallable()"); - } - - public UnaryCallable listTableSpecsCallable() { - throw new UnsupportedOperationException("Not implemented: listTableSpecsCallable()"); - } - - public UnaryCallable updateTableSpecCallable() { - throw new UnsupportedOperationException("Not implemented: updateTableSpecCallable()"); - } - - public UnaryCallable getColumnSpecCallable() { - throw new UnsupportedOperationException("Not implemented: getColumnSpecCallable()"); - } - - public UnaryCallable - listColumnSpecsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listColumnSpecsPagedCallable()"); - } - - public UnaryCallable listColumnSpecsCallable() { - throw new UnsupportedOperationException("Not implemented: listColumnSpecsCallable()"); - } - - public UnaryCallable updateColumnSpecCallable() { - throw new UnsupportedOperationException("Not implemented: updateColumnSpecCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - createModelOperationCallable() { - throw new UnsupportedOperationException("Not implemented: createModelOperationCallable()"); - } - - public UnaryCallable createModelCallable() { - throw new UnsupportedOperationException("Not implemented: createModelCallable()"); - } - - public UnaryCallable getModelCallable() { - throw new UnsupportedOperationException("Not implemented: getModelCallable()"); - } - - public UnaryCallable listModelsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listModelsPagedCallable()"); - } - - public UnaryCallable listModelsCallable() { - throw new UnsupportedOperationException("Not implemented: listModelsCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deployModelOperationCallable() { - throw new UnsupportedOperationException("Not implemented: deployModelOperationCallable()"); - } - - public UnaryCallable deployModelCallable() { - throw new UnsupportedOperationException("Not implemented: deployModelCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - undeployModelOperationCallable() { - throw new UnsupportedOperationException("Not implemented: undeployModelOperationCallable()"); - } - - public UnaryCallable undeployModelCallable() { - throw new UnsupportedOperationException("Not implemented: undeployModelCallable()"); - } - - public UnaryCallable getModelEvaluationCallable() { - throw new UnsupportedOperationException("Not implemented: getModelEvaluationCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java deleted file mode 100644 index f61dc8a65..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java +++ /dev/null @@ -1,1604 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.stub; - -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListColumnSpecsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListDatasetsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelEvaluationsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListTableSpecsPagedResponse; - -import com.google.api.core.ApiFunction; -import com.google.api.core.ApiFuture; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.grpc.ProtoOperationTransformers; -import com.google.api.gax.longrunning.OperationSnapshot; -import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiCallContext; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.PageContext; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.PagedListDescriptor; -import com.google.api.gax.rpc.PagedListResponseFactory; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.automl.v1beta1.AnnotationSpec; -import com.google.cloud.automl.v1beta1.ColumnSpec; -import com.google.cloud.automl.v1beta1.CreateDatasetRequest; -import com.google.cloud.automl.v1beta1.CreateModelRequest; -import com.google.cloud.automl.v1beta1.Dataset; -import com.google.cloud.automl.v1beta1.DeleteDatasetRequest; -import com.google.cloud.automl.v1beta1.DeleteModelRequest; -import com.google.cloud.automl.v1beta1.DeployModelRequest; -import com.google.cloud.automl.v1beta1.ExportDataRequest; -import com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; -import com.google.cloud.automl.v1beta1.ExportModelRequest; -import com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest; -import com.google.cloud.automl.v1beta1.GetColumnSpecRequest; -import com.google.cloud.automl.v1beta1.GetDatasetRequest; -import com.google.cloud.automl.v1beta1.GetModelEvaluationRequest; -import com.google.cloud.automl.v1beta1.GetModelRequest; -import com.google.cloud.automl.v1beta1.GetTableSpecRequest; -import com.google.cloud.automl.v1beta1.ImportDataRequest; -import com.google.cloud.automl.v1beta1.ListColumnSpecsRequest; -import com.google.cloud.automl.v1beta1.ListColumnSpecsResponse; -import com.google.cloud.automl.v1beta1.ListDatasetsRequest; -import com.google.cloud.automl.v1beta1.ListDatasetsResponse; -import com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest; -import com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse; -import com.google.cloud.automl.v1beta1.ListModelsRequest; -import com.google.cloud.automl.v1beta1.ListModelsResponse; -import com.google.cloud.automl.v1beta1.ListTableSpecsRequest; -import com.google.cloud.automl.v1beta1.ListTableSpecsResponse; -import com.google.cloud.automl.v1beta1.Model; -import com.google.cloud.automl.v1beta1.ModelEvaluation; -import com.google.cloud.automl.v1beta1.OperationMetadata; -import com.google.cloud.automl.v1beta1.TableSpec; -import com.google.cloud.automl.v1beta1.UndeployModelRequest; -import com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest; -import com.google.cloud.automl.v1beta1.UpdateDatasetRequest; -import com.google.cloud.automl.v1beta1.UpdateTableSpecRequest; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.longrunning.Operation; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import javax.annotation.Generated; -import org.threeten.bp.Duration; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * Settings class to configure an instance of {@link AutoMlStub}. - * - *

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

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

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

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

- * 
- * AutoMlStubSettings.Builder autoMlSettingsBuilder =
- *     AutoMlStubSettings.newBuilder();
- * autoMlSettingsBuilder
- *     .createDatasetSettings()
- *     .setRetrySettings(
- *         autoMlSettingsBuilder.createDatasetSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * AutoMlStubSettings autoMlSettings = autoMlSettingsBuilder.build();
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -public class AutoMlStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings deleteDatasetSettings; - private final OperationCallSettings - deleteDatasetOperationSettings; - private final UnaryCallSettings importDataSettings; - private final OperationCallSettings - importDataOperationSettings; - private final UnaryCallSettings exportDataSettings; - private final OperationCallSettings - exportDataOperationSettings; - private final UnaryCallSettings deleteModelSettings; - private final OperationCallSettings - deleteModelOperationSettings; - private final UnaryCallSettings exportModelSettings; - private final OperationCallSettings - exportModelOperationSettings; - private final UnaryCallSettings - exportEvaluatedExamplesSettings; - private final OperationCallSettings - exportEvaluatedExamplesOperationSettings; - private final PagedCallSettings< - ListModelEvaluationsRequest, - ListModelEvaluationsResponse, - ListModelEvaluationsPagedResponse> - listModelEvaluationsSettings; - private final UnaryCallSettings createDatasetSettings; - private final UnaryCallSettings getDatasetSettings; - private final PagedCallSettings< - ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> - listDatasetsSettings; - private final UnaryCallSettings updateDatasetSettings; - private final UnaryCallSettings - getAnnotationSpecSettings; - private final UnaryCallSettings getTableSpecSettings; - private final PagedCallSettings< - ListTableSpecsRequest, ListTableSpecsResponse, ListTableSpecsPagedResponse> - listTableSpecsSettings; - private final UnaryCallSettings updateTableSpecSettings; - private final UnaryCallSettings getColumnSpecSettings; - private final PagedCallSettings< - ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse> - listColumnSpecsSettings; - private final UnaryCallSettings updateColumnSpecSettings; - private final UnaryCallSettings createModelSettings; - private final OperationCallSettings - createModelOperationSettings; - private final UnaryCallSettings getModelSettings; - private final PagedCallSettings - listModelsSettings; - private final UnaryCallSettings deployModelSettings; - private final OperationCallSettings - deployModelOperationSettings; - private final UnaryCallSettings undeployModelSettings; - private final OperationCallSettings - undeployModelOperationSettings; - private final UnaryCallSettings - getModelEvaluationSettings; - - /** Returns the object with the settings used for calls to deleteDataset. */ - public UnaryCallSettings deleteDatasetSettings() { - return deleteDatasetSettings; - } - - /** Returns the object with the settings used for calls to deleteDataset. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteDatasetOperationSettings() { - return deleteDatasetOperationSettings; - } - - /** Returns the object with the settings used for calls to importData. */ - public UnaryCallSettings importDataSettings() { - return importDataSettings; - } - - /** Returns the object with the settings used for calls to importData. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - importDataOperationSettings() { - return importDataOperationSettings; - } - - /** Returns the object with the settings used for calls to exportData. */ - public UnaryCallSettings exportDataSettings() { - return exportDataSettings; - } - - /** Returns the object with the settings used for calls to exportData. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - exportDataOperationSettings() { - return exportDataOperationSettings; - } - - /** Returns the object with the settings used for calls to deleteModel. */ - public UnaryCallSettings deleteModelSettings() { - return deleteModelSettings; - } - - /** Returns the object with the settings used for calls to deleteModel. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - deleteModelOperationSettings() { - return deleteModelOperationSettings; - } - - /** Returns the object with the settings used for calls to exportModel. */ - public UnaryCallSettings exportModelSettings() { - return exportModelSettings; - } - - /** Returns the object with the settings used for calls to exportModel. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - exportModelOperationSettings() { - return exportModelOperationSettings; - } - - /** Returns the object with the settings used for calls to exportEvaluatedExamples. */ - public UnaryCallSettings - exportEvaluatedExamplesSettings() { - return exportEvaluatedExamplesSettings; - } - - /** Returns the object with the settings used for calls to exportEvaluatedExamples. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - exportEvaluatedExamplesOperationSettings() { - return exportEvaluatedExamplesOperationSettings; - } - - /** 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 createDataset. */ - public UnaryCallSettings createDatasetSettings() { - return createDatasetSettings; - } - - /** Returns the object with the settings used for calls to getDataset. */ - public UnaryCallSettings getDatasetSettings() { - return getDatasetSettings; - } - - /** Returns the object with the settings used for calls to listDatasets. */ - public PagedCallSettings - listDatasetsSettings() { - return listDatasetsSettings; - } - - /** Returns the object with the settings used for calls to updateDataset. */ - public UnaryCallSettings updateDatasetSettings() { - return updateDatasetSettings; - } - - /** 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 getTableSpec. */ - public UnaryCallSettings getTableSpecSettings() { - return getTableSpecSettings; - } - - /** Returns the object with the settings used for calls to listTableSpecs. */ - public PagedCallSettings< - ListTableSpecsRequest, ListTableSpecsResponse, ListTableSpecsPagedResponse> - listTableSpecsSettings() { - return listTableSpecsSettings; - } - - /** Returns the object with the settings used for calls to updateTableSpec. */ - public UnaryCallSettings updateTableSpecSettings() { - return updateTableSpecSettings; - } - - /** Returns the object with the settings used for calls to getColumnSpec. */ - public UnaryCallSettings getColumnSpecSettings() { - return getColumnSpecSettings; - } - - /** Returns the object with the settings used for calls to listColumnSpecs. */ - public PagedCallSettings< - ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse> - listColumnSpecsSettings() { - return listColumnSpecsSettings; - } - - /** Returns the object with the settings used for calls to updateColumnSpec. */ - public UnaryCallSettings updateColumnSpecSettings() { - return updateColumnSpecSettings; - } - - /** Returns the object with the settings used for calls to createModel. */ - public UnaryCallSettings createModelSettings() { - return createModelSettings; - } - - /** Returns the object with the settings used for calls to createModel. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - createModelOperationSettings() { - return createModelOperationSettings; - } - - /** Returns the object with the settings used for calls to getModel. */ - public UnaryCallSettings getModelSettings() { - return getModelSettings; - } - - /** Returns the object with the settings used for calls to listModels. */ - public PagedCallSettings - listModelsSettings() { - return listModelsSettings; - } - - /** 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - 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. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - undeployModelOperationSettings() { - return undeployModelOperationSettings; - } - - /** Returns the object with the settings used for calls to getModelEvaluation. */ - public UnaryCallSettings - getModelEvaluationSettings() { - return getModelEvaluationSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public AutoMlStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcAutoMlStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); - } - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "automl.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken("gapic", GaxProperties.getLibraryVersion(AutoMlStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected AutoMlStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - deleteDatasetSettings = settingsBuilder.deleteDatasetSettings().build(); - deleteDatasetOperationSettings = settingsBuilder.deleteDatasetOperationSettings().build(); - importDataSettings = settingsBuilder.importDataSettings().build(); - importDataOperationSettings = settingsBuilder.importDataOperationSettings().build(); - exportDataSettings = settingsBuilder.exportDataSettings().build(); - exportDataOperationSettings = settingsBuilder.exportDataOperationSettings().build(); - deleteModelSettings = settingsBuilder.deleteModelSettings().build(); - deleteModelOperationSettings = settingsBuilder.deleteModelOperationSettings().build(); - exportModelSettings = settingsBuilder.exportModelSettings().build(); - exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build(); - exportEvaluatedExamplesSettings = settingsBuilder.exportEvaluatedExamplesSettings().build(); - exportEvaluatedExamplesOperationSettings = - settingsBuilder.exportEvaluatedExamplesOperationSettings().build(); - listModelEvaluationsSettings = settingsBuilder.listModelEvaluationsSettings().build(); - createDatasetSettings = settingsBuilder.createDatasetSettings().build(); - getDatasetSettings = settingsBuilder.getDatasetSettings().build(); - listDatasetsSettings = settingsBuilder.listDatasetsSettings().build(); - updateDatasetSettings = settingsBuilder.updateDatasetSettings().build(); - getAnnotationSpecSettings = settingsBuilder.getAnnotationSpecSettings().build(); - getTableSpecSettings = settingsBuilder.getTableSpecSettings().build(); - listTableSpecsSettings = settingsBuilder.listTableSpecsSettings().build(); - updateTableSpecSettings = settingsBuilder.updateTableSpecSettings().build(); - getColumnSpecSettings = settingsBuilder.getColumnSpecSettings().build(); - listColumnSpecsSettings = settingsBuilder.listColumnSpecsSettings().build(); - updateColumnSpecSettings = settingsBuilder.updateColumnSpecSettings().build(); - createModelSettings = settingsBuilder.createModelSettings().build(); - createModelOperationSettings = settingsBuilder.createModelOperationSettings().build(); - getModelSettings = settingsBuilder.getModelSettings().build(); - listModelsSettings = settingsBuilder.listModelsSettings().build(); - deployModelSettings = settingsBuilder.deployModelSettings().build(); - deployModelOperationSettings = settingsBuilder.deployModelOperationSettings().build(); - undeployModelSettings = settingsBuilder.undeployModelSettings().build(); - undeployModelOperationSettings = settingsBuilder.undeployModelOperationSettings().build(); - getModelEvaluationSettings = settingsBuilder.getModelEvaluationSettings().build(); - } - - private static final PagedListDescriptor< - ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation> - LIST_MODEL_EVALUATIONS_PAGE_STR_DESC = - new PagedListDescriptor< - ListModelEvaluationsRequest, ListModelEvaluationsResponse, ModelEvaluation>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListModelEvaluationsRequest injectToken( - ListModelEvaluationsRequest payload, String token) { - return ListModelEvaluationsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListModelEvaluationsRequest injectPageSize( - ListModelEvaluationsRequest payload, int pageSize) { - return ListModelEvaluationsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListModelEvaluationsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListModelEvaluationsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListModelEvaluationsResponse payload) { - return payload.getModelEvaluationList() != null - ? payload.getModelEvaluationList() - : ImmutableList.of(); - } - }; - - private static final PagedListDescriptor - LIST_DATASETS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListDatasetsRequest injectToken(ListDatasetsRequest payload, String token) { - return ListDatasetsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListDatasetsRequest injectPageSize(ListDatasetsRequest payload, int pageSize) { - return ListDatasetsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListDatasetsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListDatasetsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListDatasetsResponse payload) { - return payload.getDatasetsList() != null - ? payload.getDatasetsList() - : ImmutableList.of(); - } - }; - - private static final PagedListDescriptor - LIST_TABLE_SPECS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListTableSpecsRequest injectToken(ListTableSpecsRequest payload, String token) { - return ListTableSpecsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListTableSpecsRequest injectPageSize( - ListTableSpecsRequest payload, int pageSize) { - return ListTableSpecsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListTableSpecsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListTableSpecsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListTableSpecsResponse payload) { - return payload.getTableSpecsList() != null - ? payload.getTableSpecsList() - : ImmutableList.of(); - } - }; - - private static final PagedListDescriptor< - ListColumnSpecsRequest, ListColumnSpecsResponse, ColumnSpec> - LIST_COLUMN_SPECS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListColumnSpecsRequest injectToken( - ListColumnSpecsRequest payload, String token) { - return ListColumnSpecsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListColumnSpecsRequest injectPageSize( - ListColumnSpecsRequest payload, int pageSize) { - return ListColumnSpecsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListColumnSpecsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListColumnSpecsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListColumnSpecsResponse payload) { - return payload.getColumnSpecsList() != null - ? payload.getColumnSpecsList() - : ImmutableList.of(); - } - }; - - private static final PagedListDescriptor - LIST_MODELS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListModelsRequest injectToken(ListModelsRequest payload, String token) { - return ListModelsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListModelsRequest injectPageSize(ListModelsRequest payload, int pageSize) { - return ListModelsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListModelsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListModelsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListModelsResponse payload) { - return payload.getModelList() != null - ? payload.getModelList() - : ImmutableList.of(); - } - }; - - private static final 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< - 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< - ListTableSpecsRequest, ListTableSpecsResponse, ListTableSpecsPagedResponse> - LIST_TABLE_SPECS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListTableSpecsRequest, ListTableSpecsResponse, ListTableSpecsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListTableSpecsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_TABLE_SPECS_PAGE_STR_DESC, request, context); - return ListTableSpecsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse> - LIST_COLUMN_SPECS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListColumnSpecsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_COLUMN_SPECS_PAGE_STR_DESC, request, context); - return ListColumnSpecsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> - LIST_MODELS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListModelsRequest, ListModelsResponse, ListModelsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListModelsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_MODELS_PAGE_STR_DESC, request, context); - return ListModelsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Builder for AutoMlStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - - private final UnaryCallSettings.Builder deleteDatasetSettings; - private final OperationCallSettings.Builder - deleteDatasetOperationSettings; - private final UnaryCallSettings.Builder importDataSettings; - private final OperationCallSettings.Builder - importDataOperationSettings; - private final UnaryCallSettings.Builder exportDataSettings; - private final OperationCallSettings.Builder - exportDataOperationSettings; - private final UnaryCallSettings.Builder deleteModelSettings; - private final OperationCallSettings.Builder - deleteModelOperationSettings; - private final UnaryCallSettings.Builder exportModelSettings; - private final OperationCallSettings.Builder - exportModelOperationSettings; - private final UnaryCallSettings.Builder - exportEvaluatedExamplesSettings; - private final OperationCallSettings.Builder< - ExportEvaluatedExamplesRequest, Empty, OperationMetadata> - exportEvaluatedExamplesOperationSettings; - private final PagedCallSettings.Builder< - ListModelEvaluationsRequest, - ListModelEvaluationsResponse, - ListModelEvaluationsPagedResponse> - listModelEvaluationsSettings; - private final UnaryCallSettings.Builder createDatasetSettings; - private final UnaryCallSettings.Builder getDatasetSettings; - private final PagedCallSettings.Builder< - ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> - listDatasetsSettings; - private final UnaryCallSettings.Builder updateDatasetSettings; - private final UnaryCallSettings.Builder - getAnnotationSpecSettings; - private final UnaryCallSettings.Builder getTableSpecSettings; - private final PagedCallSettings.Builder< - ListTableSpecsRequest, ListTableSpecsResponse, ListTableSpecsPagedResponse> - listTableSpecsSettings; - private final UnaryCallSettings.Builder - updateTableSpecSettings; - private final UnaryCallSettings.Builder getColumnSpecSettings; - private final PagedCallSettings.Builder< - ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse> - listColumnSpecsSettings; - private final UnaryCallSettings.Builder - updateColumnSpecSettings; - private final UnaryCallSettings.Builder createModelSettings; - private final OperationCallSettings.Builder - createModelOperationSettings; - private final UnaryCallSettings.Builder getModelSettings; - private final PagedCallSettings.Builder< - ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> - listModelsSettings; - private final UnaryCallSettings.Builder deployModelSettings; - private final OperationCallSettings.Builder - deployModelOperationSettings; - private final UnaryCallSettings.Builder undeployModelSettings; - private final OperationCallSettings.Builder - undeployModelOperationSettings; - private final UnaryCallSettings.Builder - getModelEvaluationSettings; - - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "idempotent", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(20000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(20000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("default", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this((ClientContext) null); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - deleteDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - deleteDatasetOperationSettings = OperationCallSettings.newBuilder(); - - importDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - importDataOperationSettings = OperationCallSettings.newBuilder(); - - exportDataSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - exportDataOperationSettings = OperationCallSettings.newBuilder(); - - deleteModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - deleteModelOperationSettings = OperationCallSettings.newBuilder(); - - exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - exportModelOperationSettings = OperationCallSettings.newBuilder(); - - exportEvaluatedExamplesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - exportEvaluatedExamplesOperationSettings = OperationCallSettings.newBuilder(); - - listModelEvaluationsSettings = - PagedCallSettings.newBuilder(LIST_MODEL_EVALUATIONS_PAGE_STR_FACT); - - createDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - getDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listDatasetsSettings = PagedCallSettings.newBuilder(LIST_DATASETS_PAGE_STR_FACT); - - updateDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - getAnnotationSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - getTableSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listTableSpecsSettings = PagedCallSettings.newBuilder(LIST_TABLE_SPECS_PAGE_STR_FACT); - - updateTableSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - getColumnSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listColumnSpecsSettings = PagedCallSettings.newBuilder(LIST_COLUMN_SPECS_PAGE_STR_FACT); - - updateColumnSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - createModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - createModelOperationSettings = OperationCallSettings.newBuilder(); - - getModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - listModelsSettings = PagedCallSettings.newBuilder(LIST_MODELS_PAGE_STR_FACT); - - deployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - deployModelOperationSettings = OperationCallSettings.newBuilder(); - - undeployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - undeployModelOperationSettings = OperationCallSettings.newBuilder(); - - getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - deleteDatasetSettings, - importDataSettings, - exportDataSettings, - deleteModelSettings, - exportModelSettings, - exportEvaluatedExamplesSettings, - listModelEvaluationsSettings, - createDatasetSettings, - getDatasetSettings, - listDatasetsSettings, - updateDatasetSettings, - getAnnotationSpecSettings, - getTableSpecSettings, - listTableSpecsSettings, - updateTableSpecSettings, - getColumnSpecSettings, - listColumnSpecsSettings, - updateColumnSpecSettings, - createModelSettings, - getModelSettings, - listModelsSettings, - deployModelSettings, - undeployModelSettings, - getModelEvaluationSettings); - - initDefaults(this); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .deleteDatasetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .importDataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .exportDataSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .deleteModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .exportModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .exportEvaluatedExamplesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .listModelEvaluationsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .createDatasetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .getDatasetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .listDatasetsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .updateDatasetSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .getAnnotationSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .getTableSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .listTableSpecsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .updateTableSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .getColumnSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .listColumnSpecsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .updateColumnSpecSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .createModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .getModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .listModelsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .deployModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .undeployModelSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .getModelEvaluationSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder - .deleteDatasetOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .importDataOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .exportDataOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .deleteModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .exportModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .exportEvaluatedExamplesOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .createModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Model.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .deployModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings.newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - builder - .undeployModelOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - protected Builder(AutoMlStubSettings settings) { - super(settings); - - deleteDatasetSettings = settings.deleteDatasetSettings.toBuilder(); - deleteDatasetOperationSettings = settings.deleteDatasetOperationSettings.toBuilder(); - importDataSettings = settings.importDataSettings.toBuilder(); - importDataOperationSettings = settings.importDataOperationSettings.toBuilder(); - exportDataSettings = settings.exportDataSettings.toBuilder(); - exportDataOperationSettings = settings.exportDataOperationSettings.toBuilder(); - deleteModelSettings = settings.deleteModelSettings.toBuilder(); - deleteModelOperationSettings = settings.deleteModelOperationSettings.toBuilder(); - exportModelSettings = settings.exportModelSettings.toBuilder(); - exportModelOperationSettings = settings.exportModelOperationSettings.toBuilder(); - exportEvaluatedExamplesSettings = settings.exportEvaluatedExamplesSettings.toBuilder(); - exportEvaluatedExamplesOperationSettings = - settings.exportEvaluatedExamplesOperationSettings.toBuilder(); - listModelEvaluationsSettings = settings.listModelEvaluationsSettings.toBuilder(); - createDatasetSettings = settings.createDatasetSettings.toBuilder(); - getDatasetSettings = settings.getDatasetSettings.toBuilder(); - listDatasetsSettings = settings.listDatasetsSettings.toBuilder(); - updateDatasetSettings = settings.updateDatasetSettings.toBuilder(); - getAnnotationSpecSettings = settings.getAnnotationSpecSettings.toBuilder(); - getTableSpecSettings = settings.getTableSpecSettings.toBuilder(); - listTableSpecsSettings = settings.listTableSpecsSettings.toBuilder(); - updateTableSpecSettings = settings.updateTableSpecSettings.toBuilder(); - getColumnSpecSettings = settings.getColumnSpecSettings.toBuilder(); - listColumnSpecsSettings = settings.listColumnSpecsSettings.toBuilder(); - updateColumnSpecSettings = settings.updateColumnSpecSettings.toBuilder(); - createModelSettings = settings.createModelSettings.toBuilder(); - createModelOperationSettings = settings.createModelOperationSettings.toBuilder(); - getModelSettings = settings.getModelSettings.toBuilder(); - listModelsSettings = settings.listModelsSettings.toBuilder(); - deployModelSettings = settings.deployModelSettings.toBuilder(); - deployModelOperationSettings = settings.deployModelOperationSettings.toBuilder(); - undeployModelSettings = settings.undeployModelSettings.toBuilder(); - undeployModelOperationSettings = settings.undeployModelOperationSettings.toBuilder(); - getModelEvaluationSettings = settings.getModelEvaluationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - deleteDatasetSettings, - importDataSettings, - exportDataSettings, - deleteModelSettings, - exportModelSettings, - exportEvaluatedExamplesSettings, - listModelEvaluationsSettings, - createDatasetSettings, - getDatasetSettings, - listDatasetsSettings, - updateDatasetSettings, - getAnnotationSpecSettings, - getTableSpecSettings, - listTableSpecsSettings, - updateTableSpecSettings, - getColumnSpecSettings, - listColumnSpecsSettings, - updateColumnSpecSettings, - createModelSettings, - getModelSettings, - listModelsSettings, - deployModelSettings, - undeployModelSettings, - getModelEvaluationSettings); - } - - // 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 deleteDataset. */ - public UnaryCallSettings.Builder deleteDatasetSettings() { - return deleteDatasetSettings; - } - - /** Returns the builder for the settings used for calls to deleteDataset. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - deleteDatasetOperationSettings() { - return deleteDatasetOperationSettings; - } - - /** Returns the builder for the settings used for calls to importData. */ - public UnaryCallSettings.Builder importDataSettings() { - return importDataSettings; - } - - /** Returns the builder for the settings used for calls to importData. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - importDataOperationSettings() { - return importDataOperationSettings; - } - - /** Returns the builder for the settings used for calls to exportData. */ - public UnaryCallSettings.Builder exportDataSettings() { - return exportDataSettings; - } - - /** Returns the builder for the settings used for calls to exportData. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportDataOperationSettings() { - return exportDataOperationSettings; - } - - /** Returns the builder for the settings used for calls to 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 - exportModelOperationSettings() { - return exportModelOperationSettings; - } - - /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */ - public UnaryCallSettings.Builder - exportEvaluatedExamplesSettings() { - return exportEvaluatedExamplesSettings; - } - - /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportEvaluatedExamplesOperationSettings() { - return exportEvaluatedExamplesOperationSettings; - } - - /** 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 createDataset. */ - public UnaryCallSettings.Builder createDatasetSettings() { - return createDatasetSettings; - } - - /** Returns the builder for the settings used for calls to getDataset. */ - public UnaryCallSettings.Builder getDatasetSettings() { - return getDatasetSettings; - } - - /** Returns the builder for the settings used for calls to listDatasets. */ - public PagedCallSettings.Builder< - ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse> - listDatasetsSettings() { - return listDatasetsSettings; - } - - /** Returns the builder for the settings used for calls to updateDataset. */ - public UnaryCallSettings.Builder updateDatasetSettings() { - return updateDatasetSettings; - } - - /** 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 getTableSpec. */ - public UnaryCallSettings.Builder getTableSpecSettings() { - return getTableSpecSettings; - } - - /** Returns the builder for the settings used for calls to listTableSpecs. */ - public PagedCallSettings.Builder< - ListTableSpecsRequest, ListTableSpecsResponse, ListTableSpecsPagedResponse> - listTableSpecsSettings() { - return listTableSpecsSettings; - } - - /** Returns the builder for the settings used for calls to updateTableSpec. */ - public UnaryCallSettings.Builder updateTableSpecSettings() { - return updateTableSpecSettings; - } - - /** Returns the builder for the settings used for calls to getColumnSpec. */ - public UnaryCallSettings.Builder getColumnSpecSettings() { - return getColumnSpecSettings; - } - - /** Returns the builder for the settings used for calls to listColumnSpecs. */ - public PagedCallSettings.Builder< - ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse> - listColumnSpecsSettings() { - return listColumnSpecsSettings; - } - - /** Returns the builder for the settings used for calls to updateColumnSpec. */ - public UnaryCallSettings.Builder - updateColumnSpecSettings() { - return updateColumnSpecSettings; - } - - /** Returns the builder for the settings used for calls to createModel. */ - public UnaryCallSettings.Builder createModelSettings() { - return createModelSettings; - } - - /** Returns the builder for the settings used for calls to createModel. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - createModelOperationSettings() { - return createModelOperationSettings; - } - - /** Returns the builder for the settings used for calls to getModel. */ - public UnaryCallSettings.Builder getModelSettings() { - return getModelSettings; - } - - /** Returns the builder for the settings used for calls to listModels. */ - public PagedCallSettings.Builder - listModelsSettings() { - return listModelsSettings; - } - - /** 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 - 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 - undeployModelOperationSettings() { - return undeployModelOperationSettings; - } - - /** Returns the builder for the settings used for calls to getModelEvaluation. */ - public UnaryCallSettings.Builder - getModelEvaluationSettings() { - return getModelEvaluationSettings; - } - - @Override - public AutoMlStubSettings build() throws IOException { - return new AutoMlStubSettings(this); - } - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlCallableFactory.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlCallableFactory.java deleted file mode 100644 index 034b5051b..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud AutoML API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -public class GrpcAutoMlCallableFactory implements GrpcStubCallableFactory { - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlStub.java deleted file mode 100644 index 088fbbd7c..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlStub.java +++ /dev/null @@ -1,1071 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.stub; - -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListColumnSpecsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListDatasetsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelEvaluationsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListTableSpecsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.automl.v1beta1.AnnotationSpec; -import com.google.cloud.automl.v1beta1.ColumnSpec; -import com.google.cloud.automl.v1beta1.CreateDatasetRequest; -import com.google.cloud.automl.v1beta1.CreateModelRequest; -import com.google.cloud.automl.v1beta1.Dataset; -import com.google.cloud.automl.v1beta1.DeleteDatasetRequest; -import com.google.cloud.automl.v1beta1.DeleteModelRequest; -import com.google.cloud.automl.v1beta1.DeployModelRequest; -import com.google.cloud.automl.v1beta1.ExportDataRequest; -import com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest; -import com.google.cloud.automl.v1beta1.ExportModelRequest; -import com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest; -import com.google.cloud.automl.v1beta1.GetColumnSpecRequest; -import com.google.cloud.automl.v1beta1.GetDatasetRequest; -import com.google.cloud.automl.v1beta1.GetModelEvaluationRequest; -import com.google.cloud.automl.v1beta1.GetModelRequest; -import com.google.cloud.automl.v1beta1.GetTableSpecRequest; -import com.google.cloud.automl.v1beta1.ImportDataRequest; -import com.google.cloud.automl.v1beta1.ListColumnSpecsRequest; -import com.google.cloud.automl.v1beta1.ListColumnSpecsResponse; -import com.google.cloud.automl.v1beta1.ListDatasetsRequest; -import com.google.cloud.automl.v1beta1.ListDatasetsResponse; -import com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest; -import com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse; -import com.google.cloud.automl.v1beta1.ListModelsRequest; -import com.google.cloud.automl.v1beta1.ListModelsResponse; -import com.google.cloud.automl.v1beta1.ListTableSpecsRequest; -import com.google.cloud.automl.v1beta1.ListTableSpecsResponse; -import com.google.cloud.automl.v1beta1.Model; -import com.google.cloud.automl.v1beta1.ModelEvaluation; -import com.google.cloud.automl.v1beta1.OperationMetadata; -import com.google.cloud.automl.v1beta1.TableSpec; -import com.google.cloud.automl.v1beta1.UndeployModelRequest; -import com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest; -import com.google.cloud.automl.v1beta1.UpdateDatasetRequest; -import com.google.cloud.automl.v1beta1.UpdateTableSpecRequest; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC stub implementation for Cloud AutoML API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcAutoMlStub extends AutoMlStub { - - private static final MethodDescriptor - deleteDatasetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/DeleteDataset") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteDatasetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor importDataMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ImportData") - .setRequestMarshaller(ProtoUtils.marshaller(ImportDataRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor exportDataMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ExportData") - .setRequestMarshaller(ProtoUtils.marshaller(ExportDataRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor deleteModelMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/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.automl.v1beta1.AutoMl/ExportModel") - .setRequestMarshaller(ProtoUtils.marshaller(ExportModelRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - exportEvaluatedExamplesMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ExportEvaluatedExamples") - .setRequestMarshaller( - ProtoUtils.marshaller(ExportEvaluatedExamplesRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - listModelEvaluationsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ListModelEvaluations") - .setRequestMarshaller( - ProtoUtils.marshaller(ListModelEvaluationsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListModelEvaluationsResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor - createDatasetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/CreateDataset") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateDatasetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) - .build(); - private static final MethodDescriptor getDatasetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/GetDataset") - .setRequestMarshaller(ProtoUtils.marshaller(GetDatasetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) - .build(); - private static final MethodDescriptor - listDatasetsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ListDatasets") - .setRequestMarshaller(ProtoUtils.marshaller(ListDatasetsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListDatasetsResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor - updateDatasetMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/UpdateDataset") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateDatasetRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance())) - .build(); - private static final MethodDescriptor - getAnnotationSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/GetAnnotationSpec") - .setRequestMarshaller( - ProtoUtils.marshaller(GetAnnotationSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(AnnotationSpec.getDefaultInstance())) - .build(); - private static final MethodDescriptor - getTableSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/GetTableSpec") - .setRequestMarshaller(ProtoUtils.marshaller(GetTableSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(TableSpec.getDefaultInstance())) - .build(); - private static final MethodDescriptor - listTableSpecsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ListTableSpecs") - .setRequestMarshaller( - ProtoUtils.marshaller(ListTableSpecsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListTableSpecsResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor - updateTableSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/UpdateTableSpec") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateTableSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(TableSpec.getDefaultInstance())) - .build(); - private static final MethodDescriptor - getColumnSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/GetColumnSpec") - .setRequestMarshaller( - ProtoUtils.marshaller(GetColumnSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ColumnSpec.getDefaultInstance())) - .build(); - private static final MethodDescriptor - listColumnSpecsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ListColumnSpecs") - .setRequestMarshaller( - ProtoUtils.marshaller(ListColumnSpecsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListColumnSpecsResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor - updateColumnSpecMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/UpdateColumnSpec") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateColumnSpecRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ColumnSpec.getDefaultInstance())) - .build(); - private static final MethodDescriptor createModelMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/CreateModel") - .setRequestMarshaller(ProtoUtils.marshaller(CreateModelRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor getModelMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/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.automl.v1beta1.AutoMl/ListModels") - .setRequestMarshaller(ProtoUtils.marshaller(ListModelsRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ListModelsResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor deployModelMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/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.automl.v1beta1.AutoMl/UndeployModel") - .setRequestMarshaller( - ProtoUtils.marshaller(UndeployModelRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - getModelEvaluationMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/GetModelEvaluation") - .setRequestMarshaller( - ProtoUtils.marshaller(GetModelEvaluationRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ModelEvaluation.getDefaultInstance())) - .build(); - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - private final UnaryCallable deleteDatasetCallable; - private final OperationCallable - deleteDatasetOperationCallable; - private final UnaryCallable importDataCallable; - private final OperationCallable - importDataOperationCallable; - private final UnaryCallable exportDataCallable; - private final OperationCallable - exportDataOperationCallable; - private final UnaryCallable deleteModelCallable; - private final OperationCallable - deleteModelOperationCallable; - private final UnaryCallable exportModelCallable; - private final OperationCallable - exportModelOperationCallable; - private final UnaryCallable - exportEvaluatedExamplesCallable; - private final OperationCallable - exportEvaluatedExamplesOperationCallable; - private final UnaryCallable - listModelEvaluationsCallable; - private final UnaryCallable - listModelEvaluationsPagedCallable; - private final UnaryCallable createDatasetCallable; - private final UnaryCallable getDatasetCallable; - private final UnaryCallable listDatasetsCallable; - private final UnaryCallable - listDatasetsPagedCallable; - private final UnaryCallable updateDatasetCallable; - private final UnaryCallable getAnnotationSpecCallable; - private final UnaryCallable getTableSpecCallable; - private final UnaryCallable listTableSpecsCallable; - private final UnaryCallable - listTableSpecsPagedCallable; - private final UnaryCallable updateTableSpecCallable; - private final UnaryCallable getColumnSpecCallable; - private final UnaryCallable - listColumnSpecsCallable; - private final UnaryCallable - listColumnSpecsPagedCallable; - private final UnaryCallable updateColumnSpecCallable; - private final UnaryCallable createModelCallable; - private final OperationCallable - createModelOperationCallable; - private final UnaryCallable getModelCallable; - private final UnaryCallable listModelsCallable; - private final UnaryCallable listModelsPagedCallable; - private final UnaryCallable deployModelCallable; - private final OperationCallable - deployModelOperationCallable; - private final UnaryCallable undeployModelCallable; - private final OperationCallable - undeployModelOperationCallable; - private final UnaryCallable - getModelEvaluationCallable; - - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcAutoMlStub create(AutoMlStubSettings settings) throws IOException { - return new GrpcAutoMlStub(settings, ClientContext.create(settings)); - } - - public static final GrpcAutoMlStub create(ClientContext clientContext) throws IOException { - return new GrpcAutoMlStub(AutoMlStubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcAutoMlStub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcAutoMlStub( - AutoMlStubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcAutoMlStub, using the given settings. This is protected so that - * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrpcAutoMlStub(AutoMlStubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcAutoMlCallableFactory()); - } - - /** - * Constructs an instance of GrpcAutoMlStub, using the given settings. This is protected so that - * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. - */ - protected GrpcAutoMlStub( - AutoMlStubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings 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 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 - exportEvaluatedExamplesTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportEvaluatedExamplesMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ExportEvaluatedExamplesRequest 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 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 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 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 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 getTableSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getTableSpecMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetTableSpecRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - listTableSpecsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listTableSpecsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListTableSpecsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings updateTableSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateTableSpecMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateTableSpecRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("table_spec.name", String.valueOf(request.getTableSpec().getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings getColumnSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getColumnSpecMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetColumnSpecRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings - listColumnSpecsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listColumnSpecsMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(ListColumnSpecsRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings updateColumnSpecTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateColumnSpecMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(UpdateColumnSpecRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put( - "column_spec.name", String.valueOf(request.getColumnSpec().getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings createModelTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createModelMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(CreateModelRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - } - }) - .build(); - GrpcCallSettings getModelTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getModelMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(GetModelRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings 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 deployModelTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deployModelMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(DeployModelRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - 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("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(); - - this.deleteDatasetCallable = - callableFactory.createUnaryCallable( - deleteDatasetTransportSettings, settings.deleteDatasetSettings(), clientContext); - this.deleteDatasetOperationCallable = - callableFactory.createOperationCallable( - deleteDatasetTransportSettings, - settings.deleteDatasetOperationSettings(), - clientContext, - this.operationsStub); - this.importDataCallable = - callableFactory.createUnaryCallable( - importDataTransportSettings, settings.importDataSettings(), clientContext); - this.importDataOperationCallable = - callableFactory.createOperationCallable( - importDataTransportSettings, - settings.importDataOperationSettings(), - clientContext, - this.operationsStub); - this.exportDataCallable = - callableFactory.createUnaryCallable( - exportDataTransportSettings, settings.exportDataSettings(), clientContext); - this.exportDataOperationCallable = - callableFactory.createOperationCallable( - exportDataTransportSettings, - settings.exportDataOperationSettings(), - clientContext, - this.operationsStub); - this.deleteModelCallable = - callableFactory.createUnaryCallable( - deleteModelTransportSettings, settings.deleteModelSettings(), clientContext); - this.deleteModelOperationCallable = - callableFactory.createOperationCallable( - deleteModelTransportSettings, - settings.deleteModelOperationSettings(), - clientContext, - this.operationsStub); - this.exportModelCallable = - callableFactory.createUnaryCallable( - exportModelTransportSettings, settings.exportModelSettings(), clientContext); - this.exportModelOperationCallable = - callableFactory.createOperationCallable( - exportModelTransportSettings, - settings.exportModelOperationSettings(), - clientContext, - this.operationsStub); - this.exportEvaluatedExamplesCallable = - callableFactory.createUnaryCallable( - exportEvaluatedExamplesTransportSettings, - settings.exportEvaluatedExamplesSettings(), - clientContext); - this.exportEvaluatedExamplesOperationCallable = - callableFactory.createOperationCallable( - exportEvaluatedExamplesTransportSettings, - settings.exportEvaluatedExamplesOperationSettings(), - clientContext, - this.operationsStub); - this.listModelEvaluationsCallable = - callableFactory.createUnaryCallable( - listModelEvaluationsTransportSettings, - settings.listModelEvaluationsSettings(), - clientContext); - this.listModelEvaluationsPagedCallable = - callableFactory.createPagedCallable( - listModelEvaluationsTransportSettings, - settings.listModelEvaluationsSettings(), - clientContext); - this.createDatasetCallable = - callableFactory.createUnaryCallable( - createDatasetTransportSettings, settings.createDatasetSettings(), clientContext); - this.getDatasetCallable = - callableFactory.createUnaryCallable( - getDatasetTransportSettings, settings.getDatasetSettings(), clientContext); - this.listDatasetsCallable = - callableFactory.createUnaryCallable( - listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); - this.listDatasetsPagedCallable = - callableFactory.createPagedCallable( - listDatasetsTransportSettings, settings.listDatasetsSettings(), clientContext); - this.updateDatasetCallable = - callableFactory.createUnaryCallable( - updateDatasetTransportSettings, settings.updateDatasetSettings(), clientContext); - this.getAnnotationSpecCallable = - callableFactory.createUnaryCallable( - getAnnotationSpecTransportSettings, - settings.getAnnotationSpecSettings(), - clientContext); - this.getTableSpecCallable = - callableFactory.createUnaryCallable( - getTableSpecTransportSettings, settings.getTableSpecSettings(), clientContext); - this.listTableSpecsCallable = - callableFactory.createUnaryCallable( - listTableSpecsTransportSettings, settings.listTableSpecsSettings(), clientContext); - this.listTableSpecsPagedCallable = - callableFactory.createPagedCallable( - listTableSpecsTransportSettings, settings.listTableSpecsSettings(), clientContext); - this.updateTableSpecCallable = - callableFactory.createUnaryCallable( - updateTableSpecTransportSettings, settings.updateTableSpecSettings(), clientContext); - this.getColumnSpecCallable = - callableFactory.createUnaryCallable( - getColumnSpecTransportSettings, settings.getColumnSpecSettings(), clientContext); - this.listColumnSpecsCallable = - callableFactory.createUnaryCallable( - listColumnSpecsTransportSettings, settings.listColumnSpecsSettings(), clientContext); - this.listColumnSpecsPagedCallable = - callableFactory.createPagedCallable( - listColumnSpecsTransportSettings, settings.listColumnSpecsSettings(), clientContext); - this.updateColumnSpecCallable = - callableFactory.createUnaryCallable( - updateColumnSpecTransportSettings, settings.updateColumnSpecSettings(), clientContext); - this.createModelCallable = - callableFactory.createUnaryCallable( - createModelTransportSettings, settings.createModelSettings(), clientContext); - this.createModelOperationCallable = - callableFactory.createOperationCallable( - createModelTransportSettings, - settings.createModelOperationSettings(), - clientContext, - this.operationsStub); - this.getModelCallable = - callableFactory.createUnaryCallable( - getModelTransportSettings, settings.getModelSettings(), clientContext); - this.listModelsCallable = - callableFactory.createUnaryCallable( - listModelsTransportSettings, settings.listModelsSettings(), clientContext); - this.listModelsPagedCallable = - callableFactory.createPagedCallable( - listModelsTransportSettings, settings.listModelsSettings(), clientContext); - this.deployModelCallable = - callableFactory.createUnaryCallable( - deployModelTransportSettings, settings.deployModelSettings(), clientContext); - this.deployModelOperationCallable = - callableFactory.createOperationCallable( - deployModelTransportSettings, - settings.deployModelOperationSettings(), - clientContext, - this.operationsStub); - this.undeployModelCallable = - callableFactory.createUnaryCallable( - undeployModelTransportSettings, settings.undeployModelSettings(), clientContext); - this.undeployModelOperationCallable = - callableFactory.createOperationCallable( - undeployModelTransportSettings, - settings.undeployModelOperationSettings(), - clientContext, - this.operationsStub); - this.getModelEvaluationCallable = - callableFactory.createUnaryCallable( - getModelEvaluationTransportSettings, - settings.getModelEvaluationSettings(), - clientContext); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteDatasetOperationCallable() { - return deleteDatasetOperationCallable; - } - - public UnaryCallable deleteDatasetCallable() { - return deleteDatasetCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - importDataOperationCallable() { - return importDataOperationCallable; - } - - public UnaryCallable importDataCallable() { - return importDataCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportDataOperationCallable() { - return exportDataOperationCallable; - } - - public UnaryCallable exportDataCallable() { - return exportDataCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deleteModelOperationCallable() { - return deleteModelOperationCallable; - } - - public UnaryCallable deleteModelCallable() { - return deleteModelCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportModelOperationCallable() { - return exportModelOperationCallable; - } - - public UnaryCallable exportModelCallable() { - return exportModelCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportEvaluatedExamplesOperationCallable() { - return exportEvaluatedExamplesOperationCallable; - } - - public UnaryCallable - exportEvaluatedExamplesCallable() { - return exportEvaluatedExamplesCallable; - } - - public UnaryCallable - listModelEvaluationsPagedCallable() { - return listModelEvaluationsPagedCallable; - } - - public UnaryCallable - listModelEvaluationsCallable() { - return listModelEvaluationsCallable; - } - - public UnaryCallable createDatasetCallable() { - return createDatasetCallable; - } - - public UnaryCallable getDatasetCallable() { - return getDatasetCallable; - } - - public UnaryCallable listDatasetsPagedCallable() { - return listDatasetsPagedCallable; - } - - public UnaryCallable listDatasetsCallable() { - return listDatasetsCallable; - } - - public UnaryCallable updateDatasetCallable() { - return updateDatasetCallable; - } - - public UnaryCallable getAnnotationSpecCallable() { - return getAnnotationSpecCallable; - } - - public UnaryCallable getTableSpecCallable() { - return getTableSpecCallable; - } - - public UnaryCallable - listTableSpecsPagedCallable() { - return listTableSpecsPagedCallable; - } - - public UnaryCallable listTableSpecsCallable() { - return listTableSpecsCallable; - } - - public UnaryCallable updateTableSpecCallable() { - return updateTableSpecCallable; - } - - public UnaryCallable getColumnSpecCallable() { - return getColumnSpecCallable; - } - - public UnaryCallable - listColumnSpecsPagedCallable() { - return listColumnSpecsPagedCallable; - } - - public UnaryCallable listColumnSpecsCallable() { - return listColumnSpecsCallable; - } - - public UnaryCallable updateColumnSpecCallable() { - return updateColumnSpecCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - createModelOperationCallable() { - return createModelOperationCallable; - } - - public UnaryCallable createModelCallable() { - return createModelCallable; - } - - public UnaryCallable getModelCallable() { - return getModelCallable; - } - - public UnaryCallable listModelsPagedCallable() { - return listModelsPagedCallable; - } - - public UnaryCallable listModelsCallable() { - return listModelsCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - deployModelOperationCallable() { - return deployModelOperationCallable; - } - - public UnaryCallable deployModelCallable() { - return deployModelCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - undeployModelOperationCallable() { - return undeployModelOperationCallable; - } - - public UnaryCallable undeployModelCallable() { - return undeployModelCallable; - } - - public UnaryCallable getModelEvaluationCallable() { - return getModelEvaluationCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceCallableFactory.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceCallableFactory.java deleted file mode 100644 index 4d5ae87ac..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceCallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud AutoML API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator") -@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") -public class GrpcPredictionServiceCallableFactory implements GrpcStubCallableFactory { - @Override - public UnaryCallable createUnaryCallable( - GrpcCallSettings grpcCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - GrpcCallSettings grpcCallSettings, - PagedCallSettings pagedCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createPagedCallable( - grpcCallSettings, pagedCallSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - GrpcCallSettings grpcCallSettings, - BatchingCallSettings batchingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBatchingCallable( - grpcCallSettings, batchingCallSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - GrpcCallSettings grpcCallSettings, - OperationCallSettings operationCallSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - return GrpcCallableFactory.createOperationCallable( - grpcCallSettings, operationCallSettings, clientContext, operationsStub); - } - - @Override - public - BidiStreamingCallable createBidiStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createBidiStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - GrpcCallSettings grpcCallSettings, - ServerStreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createServerStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } - - @Override - public - ClientStreamingCallable createClientStreamingCallable( - GrpcCallSettings grpcCallSettings, - StreamingCallSettings streamingCallSettings, - ClientContext clientContext) { - return GrpcCallableFactory.createClientStreamingCallable( - grpcCallSettings, streamingCallSettings, clientContext); - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceStub.java deleted file mode 100644 index 927592719..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceStub.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.RequestParamsExtractor; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.automl.v1beta1.BatchPredictRequest; -import com.google.cloud.automl.v1beta1.BatchPredictResult; -import com.google.cloud.automl.v1beta1.OperationMetadata; -import com.google.cloud.automl.v1beta1.PredictRequest; -import com.google.cloud.automl.v1beta1.PredictResponse; -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 Cloud AutoML API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public class GrpcPredictionServiceStub extends PredictionServiceStub { - - private static final MethodDescriptor predictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.PredictionService/Predict") - .setRequestMarshaller(ProtoUtils.marshaller(PredictRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(PredictResponse.getDefaultInstance())) - .build(); - private static final MethodDescriptor - batchPredictMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.automl.v1beta1.PredictionService/BatchPredict") - .setRequestMarshaller(ProtoUtils.marshaller(BatchPredictRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - - private final UnaryCallable predictCallable; - private final UnaryCallable batchPredictCallable; - private final OperationCallable - batchPredictOperationCallable; - - 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("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - GrpcCallSettings batchPredictTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(batchPredictMethodDescriptor) - .setParamsExtractor( - new RequestParamsExtractor() { - @Override - public Map extract(BatchPredictRequest request) { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - } - }) - .build(); - - this.predictCallable = - callableFactory.createUnaryCallable( - predictTransportSettings, settings.predictSettings(), clientContext); - this.batchPredictCallable = - callableFactory.createUnaryCallable( - batchPredictTransportSettings, settings.batchPredictSettings(), clientContext); - this.batchPredictOperationCallable = - callableFactory.createOperationCallable( - batchPredictTransportSettings, - settings.batchPredictOperationSettings(), - clientContext, - this.operationsStub); - - backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - public UnaryCallable predictCallable() { - return predictCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchPredictOperationCallable() { - return batchPredictOperationCallable; - } - - public UnaryCallable batchPredictCallable() { - return batchPredictCallable; - } - - @Override - public final void close() { - shutdown(); - } - - @Override - public void shutdown() { - backgroundResources.shutdown(); - } - - @Override - public boolean isShutdown() { - return backgroundResources.isShutdown(); - } - - @Override - public boolean isTerminated() { - return backgroundResources.isTerminated(); - } - - @Override - public void shutdownNow() { - backgroundResources.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return backgroundResources.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStub.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStub.java deleted file mode 100644 index c95152b31..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStub.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.automl.v1beta1.BatchPredictRequest; -import com.google.cloud.automl.v1beta1.BatchPredictResult; -import com.google.cloud.automl.v1beta1.OperationMetadata; -import com.google.cloud.automl.v1beta1.PredictRequest; -import com.google.cloud.automl.v1beta1.PredictResponse; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * Base stub class for Cloud AutoML API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") -public abstract class PredictionServiceStub implements BackgroundResource { - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationsStub getOperationsStub() { - throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); - } - - public UnaryCallable predictCallable() { - throw new UnsupportedOperationException("Not implemented: predictCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - batchPredictOperationCallable() { - throw new UnsupportedOperationException("Not implemented: batchPredictOperationCallable()"); - } - - public UnaryCallable batchPredictCallable() { - throw new UnsupportedOperationException("Not implemented: batchPredictCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStubSettings.java b/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStubSettings.java deleted file mode 100644 index c8086bd8e..000000000 --- a/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStubSettings.java +++ /dev/null @@ -1,346 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1.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.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.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.automl.v1beta1.BatchPredictRequest; -import com.google.cloud.automl.v1beta1.BatchPredictResult; -import com.google.cloud.automl.v1beta1.OperationMetadata; -import com.google.cloud.automl.v1beta1.PredictRequest; -import com.google.cloud.automl.v1beta1.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 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 PredictionServiceStub}. - * - *

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

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

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

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

- * 
- * PredictionServiceStubSettings.Builder predictionServiceSettingsBuilder =
- *     PredictionServiceStubSettings.newBuilder();
- * predictionServiceSettingsBuilder
- *     .predictSettings()
- *     .setRetrySettings(
- *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * PredictionServiceStubSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
- * 
- * 
- */ -@Generated("by gapic-generator") -@BetaApi -public class PredictionServiceStubSettings extends StubSettings { - /** The default scopes of the service. */ - private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); - - private final UnaryCallSettings predictSettings; - private final UnaryCallSettings batchPredictSettings; - private final OperationCallSettings - batchPredictOperationSettings; - - /** Returns the object with the settings used for calls to predict. */ - public UnaryCallSettings predictSettings() { - return predictSettings; - } - - /** Returns the object with the settings used for calls to batchPredict. */ - public UnaryCallSettings batchPredictSettings() { - return batchPredictSettings; - } - - /** Returns the object with the settings used for calls to batchPredict. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - batchPredictOperationSettings() { - return batchPredictOperationSettings; - } - - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") - public PredictionServiceStub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcPredictionServiceStub.create(this); - } else { - throw new UnsupportedOperationException( - "Transport not supported: " + getTransportChannelProvider().getTransportName()); - } - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return InstantiatingExecutorProvider.newBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return "automl.googleapis.com:443"; - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return DEFAULT_SERVICE_SCOPES; - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); - } - - /** Returns a builder for the default ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return defaultGrpcTransportProviderBuilder().build(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(PredictionServiceStubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new builder for this class. */ - public static Builder newBuilder(ClientContext clientContext) { - return new Builder(clientContext); - } - - /** Returns a builder containing all the values of this settings class. */ - public Builder toBuilder() { - return new Builder(this); - } - - protected PredictionServiceStubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - predictSettings = settingsBuilder.predictSettings().build(); - batchPredictSettings = settingsBuilder.batchPredictSettings().build(); - batchPredictOperationSettings = settingsBuilder.batchPredictOperationSettings().build(); - } - - /** Builder for PredictionServiceStubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - - private final UnaryCallSettings.Builder predictSettings; - private final UnaryCallSettings.Builder batchPredictSettings; - private final OperationCallSettings.Builder< - BatchPredictRequest, BatchPredictResult, OperationMetadata> - batchPredictOperationSettings; - - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put( - "idempotent", - ImmutableSet.copyOf( - Lists.newArrayList( - StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(60000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(60000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("default", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this((ClientContext) null); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - predictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - batchPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - batchPredictOperationSettings = OperationCallSettings.newBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(predictSettings, batchPredictSettings); - - initDefaults(this); - } - - private static Builder createDefault() { - Builder builder = new Builder((ClientContext) null); - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - - builder - .predictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .batchPredictSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder - .batchPredictOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(BatchPredictResult.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(500L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(5000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(300000L)) - .build())); - - return builder; - } - - protected Builder(PredictionServiceStubSettings settings) { - super(settings); - - predictSettings = settings.predictSettings.toBuilder(); - batchPredictSettings = settings.batchPredictSettings.toBuilder(); - batchPredictOperationSettings = settings.batchPredictOperationSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(predictSettings, batchPredictSettings); - } - - // 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; - } - - /** Returns the builder for the settings used for calls to batchPredict. */ - public UnaryCallSettings.Builder batchPredictSettings() { - return batchPredictSettings; - } - - /** Returns the builder for the settings used for calls to batchPredict. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - batchPredictOperationSettings() { - return batchPredictOperationSettings; - } - - @Override - public PredictionServiceStubSettings build() throws IOException { - return new PredictionServiceStubSettings(this); - } - } -} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/AutoMlClientTest.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/AutoMlClientTest.java deleted file mode 100644 index fd5231b8d..000000000 --- a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/AutoMlClientTest.java +++ /dev/null @@ -1,1269 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListColumnSpecsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListDatasetsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelEvaluationsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelsPagedResponse; -import static com.google.cloud.automl.v1beta1.AutoMlClient.ListTableSpecsPagedResponse; - -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 io.grpc.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class AutoMlClientTest { - private static MockPredictionService mockPredictionService; - private static MockAutoMl mockAutoMl; - private static MockServiceHelper serviceHelper; - private AutoMlClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockPredictionService = new MockPredictionService(); - mockAutoMl = new MockAutoMl(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockPredictionService, mockAutoMl)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - AutoMlSettings settings = - AutoMlSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = AutoMlClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void deleteDatasetTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteDatasetTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - - Empty actualResponse = client.deleteDatasetAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteDatasetRequest actualRequest = (DeleteDatasetRequest) actualRequests.get(0); - - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - - client.deleteDatasetAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void importDataTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importDataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - InputConfig inputConfig = InputConfig.newBuilder().build(); - - Empty actualResponse = client.importDataAsync(name, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportDataRequest actualRequest = (ImportDataRequest) actualRequests.get(0); - - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void importDataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - InputConfig inputConfig = InputConfig.newBuilder().build(); - - client.importDataAsync(name, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void exportDataTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportDataTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - Empty actualResponse = client.exportDataAsync(name, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportDataRequest actualRequest = (ExportDataRequest) actualRequests.get(0); - - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); - Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void exportDataExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - client.exportDataAsync(name, outputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void deleteModelTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deleteModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - Empty actualResponse = client.deleteModelAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteModelRequest actualRequest = (DeleteModelRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deleteModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - client.deleteModelAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void exportModelTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build(); - - Empty actualResponse = client.exportModelAsync(name, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportModelRequest actualRequest = (ExportModelRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void exportModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - ModelExportOutputConfig outputConfig = ModelExportOutputConfig.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 - @SuppressWarnings("all") - public void exportEvaluatedExamplesTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportEvaluatedExamplesTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - ExportEvaluatedExamplesOutputConfig outputConfig = - ExportEvaluatedExamplesOutputConfig.newBuilder().build(); - - Empty actualResponse = client.exportEvaluatedExamplesAsync(name, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportEvaluatedExamplesRequest actualRequest = - (ExportEvaluatedExamplesRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void exportEvaluatedExamplesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - ExportEvaluatedExamplesOutputConfig outputConfig = - ExportEvaluatedExamplesOutputConfig.newBuilder().build(); - - client.exportEvaluatedExamplesAsync(name, outputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void listModelEvaluationsTest() { - String nextPageToken = ""; - ModelEvaluation modelEvaluationElement = ModelEvaluation.newBuilder().build(); - List modelEvaluation = Arrays.asList(modelEvaluationElement); - ListModelEvaluationsResponse expectedResponse = - ListModelEvaluationsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllModelEvaluation(modelEvaluation) - .build(); - mockAutoMl.addResponse(expectedResponse); - - ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - ListModelEvaluationsPagedResponse pagedListResponse = client.listModelEvaluations(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getModelEvaluationList().get(0), resources.get(0)); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListModelEvaluationsRequest actualRequest = (ListModelEvaluationsRequest) actualRequests.get(0); - - Assert.assertEquals(parent, ModelName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listModelEvaluationsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - client.listModelEvaluations(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void createDatasetTest() { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - int exampleCount = 1517063674; - String etag = "etag3123477"; - Dataset expectedResponse = - Dataset.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setExampleCount(exampleCount) - .setEtag(etag) - .build(); - mockAutoMl.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Dataset dataset = Dataset.newBuilder().build(); - - Dataset actualResponse = client.createDataset(parent, dataset); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateDatasetRequest actualRequest = (CreateDatasetRequest) actualRequests.get(0); - - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); - Assert.assertEquals(dataset, actualRequest.getDataset()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void createDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Dataset dataset = Dataset.newBuilder().build(); - - client.createDataset(parent, dataset); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void getDatasetTest() { - DatasetName name2 = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - int exampleCount = 1517063674; - String etag = "etag3123477"; - Dataset expectedResponse = - Dataset.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setExampleCount(exampleCount) - .setEtag(etag) - .build(); - mockAutoMl.addResponse(expectedResponse); - - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - - Dataset actualResponse = client.getDataset(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetDatasetRequest actualRequest = (GetDatasetRequest) actualRequests.get(0); - - Assert.assertEquals(name, DatasetName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - - client.getDataset(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listDatasetsTest() { - String nextPageToken = ""; - Dataset datasetsElement = Dataset.newBuilder().build(); - List datasets = Arrays.asList(datasetsElement); - ListDatasetsResponse expectedResponse = - ListDatasetsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllDatasets(datasets) - .build(); - mockAutoMl.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListDatasetsPagedResponse pagedListResponse = client.listDatasets(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getDatasetsList().get(0), resources.get(0)); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListDatasetsRequest actualRequest = (ListDatasetsRequest) actualRequests.get(0); - - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listDatasetsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - client.listDatasets(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void updateDatasetTest() { - DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - String displayName = "displayName1615086568"; - String description = "description-1724546052"; - int exampleCount = 1517063674; - String etag = "etag3123477"; - Dataset expectedResponse = - Dataset.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setDescription(description) - .setExampleCount(exampleCount) - .setEtag(etag) - .build(); - mockAutoMl.addResponse(expectedResponse); - - Dataset dataset = Dataset.newBuilder().build(); - - Dataset actualResponse = client.updateDataset(dataset); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateDatasetRequest actualRequest = (UpdateDatasetRequest) actualRequests.get(0); - - Assert.assertEquals(dataset, actualRequest.getDataset()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void updateDatasetExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - Dataset dataset = Dataset.newBuilder().build(); - - client.updateDataset(dataset); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void getAnnotationSpecTest() { - AnnotationSpecName name2 = - AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"); - String displayName = "displayName1615086568"; - int exampleCount = 1517063674; - AnnotationSpec expectedResponse = - AnnotationSpec.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setExampleCount(exampleCount) - .build(); - mockAutoMl.addResponse(expectedResponse); - - AnnotationSpecName name = - AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]"); - - AnnotationSpec actualResponse = client.getAnnotationSpec(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetAnnotationSpecRequest actualRequest = (GetAnnotationSpecRequest) actualRequests.get(0); - - Assert.assertEquals(name, AnnotationSpecName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getAnnotationSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.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 - @SuppressWarnings("all") - public void getTableSpecTest() { - TableSpecName name2 = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]"); - String timeColumnSpecId = "timeColumnSpecId1558734824"; - long rowCount = 1340416618L; - long validRowCount = 406068761L; - long columnCount = 122671386L; - String etag = "etag3123477"; - TableSpec expectedResponse = - TableSpec.newBuilder() - .setName(name2.toString()) - .setTimeColumnSpecId(timeColumnSpecId) - .setRowCount(rowCount) - .setValidRowCount(validRowCount) - .setColumnCount(columnCount) - .setEtag(etag) - .build(); - mockAutoMl.addResponse(expectedResponse); - - TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]"); - - TableSpec actualResponse = client.getTableSpec(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetTableSpecRequest actualRequest = (GetTableSpecRequest) actualRequests.get(0); - - Assert.assertEquals(name, TableSpecName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getTableSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]"); - - client.getTableSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listTableSpecsTest() { - String nextPageToken = ""; - TableSpec tableSpecsElement = TableSpec.newBuilder().build(); - List tableSpecs = Arrays.asList(tableSpecsElement); - ListTableSpecsResponse expectedResponse = - ListTableSpecsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllTableSpecs(tableSpecs) - .build(); - mockAutoMl.addResponse(expectedResponse); - - DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - - ListTableSpecsPagedResponse pagedListResponse = client.listTableSpecs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getTableSpecsList().get(0), resources.get(0)); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListTableSpecsRequest actualRequest = (ListTableSpecsRequest) actualRequests.get(0); - - Assert.assertEquals(parent, DatasetName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listTableSpecsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); - - client.listTableSpecs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void updateTableSpecTest() { - TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]"); - String timeColumnSpecId = "timeColumnSpecId1558734824"; - long rowCount = 1340416618L; - long validRowCount = 406068761L; - long columnCount = 122671386L; - String etag = "etag3123477"; - TableSpec expectedResponse = - TableSpec.newBuilder() - .setName(name.toString()) - .setTimeColumnSpecId(timeColumnSpecId) - .setRowCount(rowCount) - .setValidRowCount(validRowCount) - .setColumnCount(columnCount) - .setEtag(etag) - .build(); - mockAutoMl.addResponse(expectedResponse); - - TableSpec tableSpec = TableSpec.newBuilder().build(); - - TableSpec actualResponse = client.updateTableSpec(tableSpec); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateTableSpecRequest actualRequest = (UpdateTableSpecRequest) actualRequests.get(0); - - Assert.assertEquals(tableSpec, actualRequest.getTableSpec()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void updateTableSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - TableSpec tableSpec = TableSpec.newBuilder().build(); - - client.updateTableSpec(tableSpec); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void getColumnSpecTest() { - ColumnSpecName name2 = - ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]"); - String displayName = "displayName1615086568"; - String etag = "etag3123477"; - ColumnSpec expectedResponse = - ColumnSpec.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setEtag(etag) - .build(); - mockAutoMl.addResponse(expectedResponse); - - ColumnSpecName name = - ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]"); - - ColumnSpec actualResponse = client.getColumnSpec(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetColumnSpecRequest actualRequest = (GetColumnSpecRequest) actualRequests.get(0); - - Assert.assertEquals(name, ColumnSpecName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getColumnSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ColumnSpecName name = - ColumnSpecName.of( - "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]"); - - client.getColumnSpec(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listColumnSpecsTest() { - String nextPageToken = ""; - ColumnSpec columnSpecsElement = ColumnSpec.newBuilder().build(); - List columnSpecs = Arrays.asList(columnSpecsElement); - ListColumnSpecsResponse expectedResponse = - ListColumnSpecsResponse.newBuilder() - .setNextPageToken(nextPageToken) - .addAllColumnSpecs(columnSpecs) - .build(); - mockAutoMl.addResponse(expectedResponse); - - TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]"); - - ListColumnSpecsPagedResponse pagedListResponse = client.listColumnSpecs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getColumnSpecsList().get(0), resources.get(0)); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListColumnSpecsRequest actualRequest = (ListColumnSpecsRequest) actualRequests.get(0); - - Assert.assertEquals(parent, TableSpecName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listColumnSpecsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - TableSpecName parent = - TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]"); - - client.listColumnSpecs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void updateColumnSpecTest() { - ColumnSpecName name = - ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]"); - String displayName = "displayName1615086568"; - String etag = "etag3123477"; - ColumnSpec expectedResponse = - ColumnSpec.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setEtag(etag) - .build(); - mockAutoMl.addResponse(expectedResponse); - - ColumnSpec columnSpec = ColumnSpec.newBuilder().build(); - - ColumnSpec actualResponse = client.updateColumnSpec(columnSpec); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateColumnSpecRequest actualRequest = (UpdateColumnSpecRequest) actualRequests.get(0); - - Assert.assertEquals(columnSpec, actualRequest.getColumnSpec()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void updateColumnSpecExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ColumnSpec columnSpec = ColumnSpec.newBuilder().build(); - - client.updateColumnSpec(columnSpec); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void createModelTest() throws Exception { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - String displayName = "displayName1615086568"; - String datasetId = "datasetId-2115646910"; - Model expectedResponse = - Model.newBuilder() - .setName(name.toString()) - .setDisplayName(displayName) - .setDatasetId(datasetId) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("createModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Model model = Model.newBuilder().build(); - - Model actualResponse = client.createModelAsync(parent, model).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateModelRequest actualRequest = (CreateModelRequest) actualRequests.get(0); - - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); - Assert.assertEquals(model, actualRequest.getModel()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void createModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - Model model = Model.newBuilder().build(); - - client.createModelAsync(parent, model).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void getModelTest() { - ModelName name2 = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - String displayName = "displayName1615086568"; - String datasetId = "datasetId-2115646910"; - Model expectedResponse = - Model.newBuilder() - .setName(name2.toString()) - .setDisplayName(displayName) - .setDatasetId(datasetId) - .build(); - mockAutoMl.addResponse(expectedResponse); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - Model actualResponse = client.getModel(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetModelRequest actualRequest = (GetModelRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - client.getModel(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void listModelsTest() { - String nextPageToken = ""; - Model modelElement = Model.newBuilder().build(); - List model = Arrays.asList(modelElement); - ListModelsResponse expectedResponse = - ListModelsResponse.newBuilder().setNextPageToken(nextPageToken).addAllModel(model).build(); - mockAutoMl.addResponse(expectedResponse); - - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - ListModelsPagedResponse pagedListResponse = client.listModels(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getModelList().get(0), resources.get(0)); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListModelsRequest actualRequest = (ListModelsRequest) actualRequests.get(0); - - Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void listModelsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); - - client.listModels(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void deployModelTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("deployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - Empty actualResponse = client.deployModelAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeployModelRequest actualRequest = (DeployModelRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void deployModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - client.deployModelAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void undeployModelTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("undeployModelTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockAutoMl.addResponse(resultOperation); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - Empty actualResponse = client.undeployModelAsync(name).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UndeployModelRequest actualRequest = (UndeployModelRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void undeployModelExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - - client.undeployModelAsync(name).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void getModelEvaluationTest() { - ModelEvaluationName name2 = - ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"); - String annotationSpecId = "annotationSpecId60690191"; - String displayName = "displayName1615086568"; - int evaluatedExampleCount = 277565350; - ModelEvaluation expectedResponse = - ModelEvaluation.newBuilder() - .setName(name2.toString()) - .setAnnotationSpecId(annotationSpecId) - .setDisplayName(displayName) - .setEvaluatedExampleCount(evaluatedExampleCount) - .build(); - mockAutoMl.addResponse(expectedResponse); - - ModelEvaluationName name = - ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"); - - ModelEvaluation actualResponse = client.getModelEvaluation(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockAutoMl.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetModelEvaluationRequest actualRequest = (GetModelEvaluationRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelEvaluationName.parse(actualRequest.getName())); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void getModelEvaluationExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockAutoMl.addException(exception); - - try { - ModelEvaluationName name = - ModelEvaluationName.of("[PROJECT]", "[LOCATION]", "[MODEL]", "[MODEL_EVALUATION]"); - - client.getModelEvaluation(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } -} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockAutoMl.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockAutoMl.java deleted file mode 100644 index 35c01d47f..000000000 --- a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockAutoMl.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -public class MockAutoMl implements MockGrpcService { - private final MockAutoMlImpl serviceImpl; - - public MockAutoMl() { - serviceImpl = new MockAutoMlImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockAutoMlImpl.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockAutoMlImpl.java deleted file mode 100644 index 8f5a614f5..000000000 --- a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockAutoMlImpl.java +++ /dev/null @@ -1,412 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.automl.v1beta1.AutoMlGrpc.AutoMlImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -public class MockAutoMlImpl extends AutoMlImplBase { - private List requests; - private Queue responses; - - public MockAutoMlImpl() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - public List getRequests() { - return requests; - } - - public void addResponse(AbstractMessage response) { - responses.add(response); - } - - public void setResponses(List responses) { - this.responses = new LinkedList(responses); - } - - public void addException(Exception exception) { - responses.add(exception); - } - - public void reset() { - requests = new ArrayList<>(); - responses = new LinkedList<>(); - } - - @Override - public void createDataset( - CreateDatasetRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof 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 getDataset(GetDatasetRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Dataset) { - requests.add(request); - responseObserver.onNext((Dataset) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void listDatasets( - ListDatasetsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof ListDatasetsResponse) { - requests.add(request); - responseObserver.onNext((ListDatasetsResponse) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void updateDataset( - UpdateDatasetRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Dataset) { - requests.add(request); - responseObserver.onNext((Dataset) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void deleteDataset( - DeleteDatasetRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void importData(ImportDataRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void exportData(ExportDataRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void 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 getTableSpec( - GetTableSpecRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof TableSpec) { - requests.add(request); - responseObserver.onNext((TableSpec) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void listTableSpecs( - ListTableSpecsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof ListTableSpecsResponse) { - requests.add(request); - responseObserver.onNext((ListTableSpecsResponse) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void updateTableSpec( - UpdateTableSpecRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof TableSpec) { - requests.add(request); - responseObserver.onNext((TableSpec) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void getColumnSpec( - GetColumnSpecRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof ColumnSpec) { - requests.add(request); - responseObserver.onNext((ColumnSpec) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void listColumnSpecs( - ListColumnSpecsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof ListColumnSpecsResponse) { - requests.add(request); - responseObserver.onNext((ListColumnSpecsResponse) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void updateColumnSpec( - UpdateColumnSpecRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof ColumnSpec) { - requests.add(request); - responseObserver.onNext((ColumnSpec) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void createModel(CreateModelRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void getModel(GetModelRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Model) { - requests.add(request); - responseObserver.onNext((Model) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void listModels( - ListModelsRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof ListModelsResponse) { - requests.add(request); - responseObserver.onNext((ListModelsResponse) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void deleteModel(DeleteModelRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void 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")); - } - } - - @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 exportEvaluatedExamples( - ExportEvaluatedExamplesRequest 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")); - } - } -} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockPredictionService.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockPredictionService.java deleted file mode 100644 index ff6a92a87..000000000 --- a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockPredictionService.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -public class MockPredictionService implements MockGrpcService { - private final MockPredictionServiceImpl serviceImpl; - - public MockPredictionService() { - serviceImpl = new MockPredictionServiceImpl(); - } - - @Override - public List getRequests() { - return serviceImpl.getRequests(); - } - - @Override - public void addResponse(AbstractMessage response) { - serviceImpl.addResponse(response); - } - - @Override - public void addException(Exception exception) { - serviceImpl.addException(exception); - } - - @Override - public ServerServiceDefinition getServiceDefinition() { - return serviceImpl.bindService(); - } - - @Override - public void reset() { - serviceImpl.reset(); - } -} diff --git a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockPredictionServiceImpl.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockPredictionServiceImpl.java deleted file mode 100644 index 5e4be5b95..000000000 --- a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/MockPredictionServiceImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.automl.v1beta1.PredictionServiceGrpc.PredictionServiceImplBase; -import com.google.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import io.grpc.stub.StreamObserver; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Queue; - -@javax.annotation.Generated("by GAPIC") -@BetaApi -public class 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")); - } - } - - @Override - public void batchPredict( - BatchPredictRequest 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-automl/src/test/java/com/google/cloud/automl/v1beta1/PredictionServiceClientTest.java b/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/PredictionServiceClientTest.java deleted file mode 100644 index e073c7291..000000000 --- a/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/PredictionServiceClientTest.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -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.longrunning.Operation; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Any; -import io.grpc.Status; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.ExecutionException; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -@javax.annotation.Generated("by GAPIC") -public class PredictionServiceClientTest { - private static MockPredictionService mockPredictionService; - private static MockAutoMl mockAutoMl; - private static MockServiceHelper serviceHelper; - private PredictionServiceClient client; - private LocalChannelProvider channelProvider; - - @BeforeClass - public static void startStaticServer() { - mockPredictionService = new MockPredictionService(); - mockAutoMl = new MockAutoMl(); - serviceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockPredictionService, mockAutoMl)); - serviceHelper.start(); - } - - @AfterClass - public static void stopServer() { - serviceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - serviceHelper.reset(); - channelProvider = serviceHelper.createChannelProvider(); - PredictionServiceSettings settings = - PredictionServiceSettings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = PredictionServiceClient.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - @SuppressWarnings("all") - public void predictTest() { - PredictResponse expectedResponse = PredictResponse.newBuilder().build(); - mockPredictionService.addResponse(expectedResponse); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - ExamplePayload payload = ExamplePayload.newBuilder().build(); - Map params = new HashMap<>(); - - PredictResponse actualResponse = client.predict(name, payload, params); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - PredictRequest actualRequest = (PredictRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertEquals(payload, actualRequest.getPayload()); - Assert.assertEquals(params, actualRequest.getParamsMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void predictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - ExamplePayload payload = ExamplePayload.newBuilder().build(); - Map params = new HashMap<>(); - - client.predict(name, payload, params); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception - } - } - - @Test - @SuppressWarnings("all") - public void batchPredictTest() throws Exception { - BatchPredictResult expectedResponse = BatchPredictResult.newBuilder().build(); - Operation resultOperation = - Operation.newBuilder() - .setName("batchPredictTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockPredictionService.addResponse(resultOperation); - - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build(); - BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build(); - Map params = new HashMap<>(); - - BatchPredictResult actualResponse = - client.batchPredictAsync(name, inputConfig, outputConfig, params).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockPredictionService.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - BatchPredictRequest actualRequest = (BatchPredictRequest) actualRequests.get(0); - - Assert.assertEquals(name, ModelName.parse(actualRequest.getName())); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); - Assert.assertEquals(params, actualRequest.getParamsMap()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void batchPredictExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockPredictionService.addException(exception); - - try { - ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); - BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build(); - BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build(); - Map params = new HashMap<>(); - - client.batchPredictAsync(name, inputConfig, outputConfig, params).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/grpc-google-cloud-automl-v1beta1/clirr-ignored-differences.xml b/grpc-google-cloud-automl-v1beta1/clirr-ignored-differences.xml deleted file mode 100644 index 03dba063e..000000000 --- a/grpc-google-cloud-automl-v1beta1/clirr-ignored-differences.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - 6001 - com/google/cloud/automl/v1beta1/*Grpc - METHOD_* - - \ No newline at end of file diff --git a/grpc-google-cloud-automl-v1beta1/pom.xml b/grpc-google-cloud-automl-v1beta1/pom.xml deleted file mode 100644 index a55337bef..000000000 --- a/grpc-google-cloud-automl-v1beta1/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-automl-v1beta1 - 0.82.3-SNAPSHOT - grpc-google-cloud-automl-v1beta1 - GRPC library for grpc-google-cloud-automl-v1beta1 - - com.google.cloud - google-cloud-automl-parent - 1.1.3-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api.grpc - proto-google-cloud-automl-v1beta1 - - - com.google.guava - guava - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - \ No newline at end of file diff --git a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlGrpc.java b/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlGrpc.java deleted file mode 100644 index b3cd93eea..000000000 --- a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlGrpc.java +++ /dev/null @@ -1,3194 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * AutoML Server API.
- * The resource names are assigned by the server.
- * The server never reuses names that it has created after the resources with
- * those names are deleted.
- * An ID of a resource is the last element of the item's resource name. For
- * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
- * the id for the item is `{dataset_id}`.
- * Currently the only supported `location_id` is "us-central1".
- * On any input that is documented to expect a string parameter in
- * snake_case or kebab-case, either of those cases is accepted.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/automl/v1beta1/service.proto") -public final class AutoMlGrpc { - - private AutoMlGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.automl.v1beta1.AutoMl"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.CreateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getCreateDatasetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateDataset", - requestType = com.google.cloud.automl.v1beta1.CreateDatasetRequest.class, - responseType = com.google.cloud.automl.v1beta1.Dataset.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.CreateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getCreateDatasetMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.CreateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getCreateDatasetMethod; - if ((getCreateDatasetMethod = AutoMlGrpc.getCreateDatasetMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getCreateDatasetMethod = AutoMlGrpc.getCreateDatasetMethod) == null) { - AutoMlGrpc.getCreateDatasetMethod = - getCreateDatasetMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataset")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.CreateDatasetRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("CreateDataset")) - .build(); - } - } - } - return getCreateDatasetMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getGetDatasetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetDataset", - requestType = com.google.cloud.automl.v1beta1.GetDatasetRequest.class, - responseType = com.google.cloud.automl.v1beta1.Dataset.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getGetDatasetMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getGetDatasetMethod; - if ((getGetDatasetMethod = AutoMlGrpc.getGetDatasetMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getGetDatasetMethod = AutoMlGrpc.getGetDatasetMethod) == null) { - AutoMlGrpc.getGetDatasetMethod = - getGetDatasetMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataset")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.GetDatasetRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetDataset")) - .build(); - } - } - } - return getGetDatasetMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListDatasetsRequest, - com.google.cloud.automl.v1beta1.ListDatasetsResponse> - getListDatasetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListDatasets", - requestType = com.google.cloud.automl.v1beta1.ListDatasetsRequest.class, - responseType = com.google.cloud.automl.v1beta1.ListDatasetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListDatasetsRequest, - com.google.cloud.automl.v1beta1.ListDatasetsResponse> - getListDatasetsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListDatasetsRequest, - com.google.cloud.automl.v1beta1.ListDatasetsResponse> - getListDatasetsMethod; - if ((getListDatasetsMethod = AutoMlGrpc.getListDatasetsMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getListDatasetsMethod = AutoMlGrpc.getListDatasetsMethod) == null) { - AutoMlGrpc.getListDatasetsMethod = - getListDatasetsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDatasets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListDatasetsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListDatasetsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ListDatasets")) - .build(); - } - } - } - return getListDatasetsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getUpdateDatasetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateDataset", - requestType = com.google.cloud.automl.v1beta1.UpdateDatasetRequest.class, - responseType = com.google.cloud.automl.v1beta1.Dataset.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getUpdateDatasetMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset> - getUpdateDatasetMethod; - if ((getUpdateDatasetMethod = AutoMlGrpc.getUpdateDatasetMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getUpdateDatasetMethod = AutoMlGrpc.getUpdateDatasetMethod) == null) { - AutoMlGrpc.getUpdateDatasetMethod = - getUpdateDatasetMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataset")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.UpdateDatasetRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("UpdateDataset")) - .build(); - } - } - } - return getUpdateDatasetMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeleteDatasetRequest, com.google.longrunning.Operation> - getDeleteDatasetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteDataset", - requestType = com.google.cloud.automl.v1beta1.DeleteDatasetRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeleteDatasetRequest, com.google.longrunning.Operation> - getDeleteDatasetMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeleteDatasetRequest, com.google.longrunning.Operation> - getDeleteDatasetMethod; - if ((getDeleteDatasetMethod = AutoMlGrpc.getDeleteDatasetMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getDeleteDatasetMethod = AutoMlGrpc.getDeleteDatasetMethod) == null) { - AutoMlGrpc.getDeleteDatasetMethod = - getDeleteDatasetMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDataset")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.DeleteDatasetRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("DeleteDataset")) - .build(); - } - } - } - return getDeleteDatasetMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ImportDataRequest, com.google.longrunning.Operation> - getImportDataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ImportData", - requestType = com.google.cloud.automl.v1beta1.ImportDataRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ImportDataRequest, com.google.longrunning.Operation> - getImportDataMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ImportDataRequest, com.google.longrunning.Operation> - getImportDataMethod; - if ((getImportDataMethod = AutoMlGrpc.getImportDataMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getImportDataMethod = AutoMlGrpc.getImportDataMethod) == null) { - AutoMlGrpc.getImportDataMethod = - getImportDataMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportData")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ImportDataRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ImportData")) - .build(); - } - } - } - return getImportDataMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportDataRequest, com.google.longrunning.Operation> - getExportDataMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ExportData", - requestType = com.google.cloud.automl.v1beta1.ExportDataRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportDataRequest, com.google.longrunning.Operation> - getExportDataMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportDataRequest, com.google.longrunning.Operation> - getExportDataMethod; - if ((getExportDataMethod = AutoMlGrpc.getExportDataMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getExportDataMethod = AutoMlGrpc.getExportDataMethod) == null) { - AutoMlGrpc.getExportDataMethod = - getExportDataMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportData")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ExportDataRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ExportData")) - .build(); - } - } - } - return getExportDataMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest, - com.google.cloud.automl.v1beta1.AnnotationSpec> - getGetAnnotationSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAnnotationSpec", - requestType = com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest.class, - responseType = com.google.cloud.automl.v1beta1.AnnotationSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest, - com.google.cloud.automl.v1beta1.AnnotationSpec> - getGetAnnotationSpecMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest, - com.google.cloud.automl.v1beta1.AnnotationSpec> - getGetAnnotationSpecMethod; - if ((getGetAnnotationSpecMethod = AutoMlGrpc.getGetAnnotationSpecMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getGetAnnotationSpecMethod = AutoMlGrpc.getGetAnnotationSpecMethod) == null) { - AutoMlGrpc.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.automl.v1beta1.GetAnnotationSpecRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.AnnotationSpec.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetAnnotationSpec")) - .build(); - } - } - } - return getGetAnnotationSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec> - getGetTableSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetTableSpec", - requestType = com.google.cloud.automl.v1beta1.GetTableSpecRequest.class, - responseType = com.google.cloud.automl.v1beta1.TableSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec> - getGetTableSpecMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec> - getGetTableSpecMethod; - if ((getGetTableSpecMethod = AutoMlGrpc.getGetTableSpecMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getGetTableSpecMethod = AutoMlGrpc.getGetTableSpecMethod) == null) { - AutoMlGrpc.getGetTableSpecMethod = - getGetTableSpecMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTableSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.GetTableSpecRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetTableSpec")) - .build(); - } - } - } - return getGetTableSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListTableSpecsRequest, - com.google.cloud.automl.v1beta1.ListTableSpecsResponse> - getListTableSpecsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListTableSpecs", - requestType = com.google.cloud.automl.v1beta1.ListTableSpecsRequest.class, - responseType = com.google.cloud.automl.v1beta1.ListTableSpecsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListTableSpecsRequest, - com.google.cloud.automl.v1beta1.ListTableSpecsResponse> - getListTableSpecsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListTableSpecsRequest, - com.google.cloud.automl.v1beta1.ListTableSpecsResponse> - getListTableSpecsMethod; - if ((getListTableSpecsMethod = AutoMlGrpc.getListTableSpecsMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getListTableSpecsMethod = AutoMlGrpc.getListTableSpecsMethod) == null) { - AutoMlGrpc.getListTableSpecsMethod = - getListTableSpecsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTableSpecs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListTableSpecsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListTableSpecsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ListTableSpecs")) - .build(); - } - } - } - return getListTableSpecsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec> - getUpdateTableSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateTableSpec", - requestType = com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.class, - responseType = com.google.cloud.automl.v1beta1.TableSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec> - getUpdateTableSpecMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec> - getUpdateTableSpecMethod; - if ((getUpdateTableSpecMethod = AutoMlGrpc.getUpdateTableSpecMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getUpdateTableSpecMethod = AutoMlGrpc.getUpdateTableSpecMethod) == null) { - AutoMlGrpc.getUpdateTableSpecMethod = - getUpdateTableSpecMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTableSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("UpdateTableSpec")) - .build(); - } - } - } - return getUpdateTableSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec> - getGetColumnSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetColumnSpec", - requestType = com.google.cloud.automl.v1beta1.GetColumnSpecRequest.class, - responseType = com.google.cloud.automl.v1beta1.ColumnSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec> - getGetColumnSpecMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec> - getGetColumnSpecMethod; - if ((getGetColumnSpecMethod = AutoMlGrpc.getGetColumnSpecMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getGetColumnSpecMethod = AutoMlGrpc.getGetColumnSpecMethod) == null) { - AutoMlGrpc.getGetColumnSpecMethod = - getGetColumnSpecMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetColumnSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.GetColumnSpecRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetColumnSpec")) - .build(); - } - } - } - return getGetColumnSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest, - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse> - getListColumnSpecsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListColumnSpecs", - requestType = com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.class, - responseType = com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest, - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse> - getListColumnSpecsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest, - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse> - getListColumnSpecsMethod; - if ((getListColumnSpecsMethod = AutoMlGrpc.getListColumnSpecsMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getListColumnSpecsMethod = AutoMlGrpc.getListColumnSpecsMethod) == null) { - AutoMlGrpc.getListColumnSpecsMethod = - getListColumnSpecsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListColumnSpecs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ListColumnSpecs")) - .build(); - } - } - } - return getListColumnSpecsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec> - getUpdateColumnSpecMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateColumnSpec", - requestType = com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.class, - responseType = com.google.cloud.automl.v1beta1.ColumnSpec.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec> - getUpdateColumnSpecMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec> - getUpdateColumnSpecMethod; - if ((getUpdateColumnSpecMethod = AutoMlGrpc.getUpdateColumnSpecMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getUpdateColumnSpecMethod = AutoMlGrpc.getUpdateColumnSpecMethod) == null) { - AutoMlGrpc.getUpdateColumnSpecMethod = - getUpdateColumnSpecMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateColumnSpec")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("UpdateColumnSpec")) - .build(); - } - } - } - return getUpdateColumnSpecMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.CreateModelRequest, com.google.longrunning.Operation> - getCreateModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateModel", - requestType = com.google.cloud.automl.v1beta1.CreateModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.CreateModelRequest, com.google.longrunning.Operation> - getCreateModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.CreateModelRequest, com.google.longrunning.Operation> - getCreateModelMethod; - if ((getCreateModelMethod = AutoMlGrpc.getCreateModelMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getCreateModelMethod = AutoMlGrpc.getCreateModelMethod) == null) { - AutoMlGrpc.getCreateModelMethod = - getCreateModelMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateModel")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.CreateModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("CreateModel")) - .build(); - } - } - } - return getCreateModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetModelRequest, com.google.cloud.automl.v1beta1.Model> - getGetModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetModel", - requestType = com.google.cloud.automl.v1beta1.GetModelRequest.class, - responseType = com.google.cloud.automl.v1beta1.Model.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetModelRequest, com.google.cloud.automl.v1beta1.Model> - getGetModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetModelRequest, com.google.cloud.automl.v1beta1.Model> - getGetModelMethod; - if ((getGetModelMethod = AutoMlGrpc.getGetModelMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getGetModelMethod = AutoMlGrpc.getGetModelMethod) == null) { - AutoMlGrpc.getGetModelMethod = - getGetModelMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetModel")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.GetModelRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.Model.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetModel")) - .build(); - } - } - } - return getGetModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListModelsRequest, - com.google.cloud.automl.v1beta1.ListModelsResponse> - getListModelsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListModels", - requestType = com.google.cloud.automl.v1beta1.ListModelsRequest.class, - responseType = com.google.cloud.automl.v1beta1.ListModelsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListModelsRequest, - com.google.cloud.automl.v1beta1.ListModelsResponse> - getListModelsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListModelsRequest, - com.google.cloud.automl.v1beta1.ListModelsResponse> - getListModelsMethod; - if ((getListModelsMethod = AutoMlGrpc.getListModelsMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getListModelsMethod = AutoMlGrpc.getListModelsMethod) == null) { - AutoMlGrpc.getListModelsMethod = - getListModelsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListModels")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListModelsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListModelsResponse - .getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ListModels")) - .build(); - } - } - } - return getListModelsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeleteModelRequest, com.google.longrunning.Operation> - getDeleteModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteModel", - requestType = com.google.cloud.automl.v1beta1.DeleteModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeleteModelRequest, com.google.longrunning.Operation> - getDeleteModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeleteModelRequest, com.google.longrunning.Operation> - getDeleteModelMethod; - if ((getDeleteModelMethod = AutoMlGrpc.getDeleteModelMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getDeleteModelMethod = AutoMlGrpc.getDeleteModelMethod) == null) { - AutoMlGrpc.getDeleteModelMethod = - getDeleteModelMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteModel")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.DeleteModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("DeleteModel")) - .build(); - } - } - } - return getDeleteModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeployModelRequest, com.google.longrunning.Operation> - getDeployModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeployModel", - requestType = com.google.cloud.automl.v1beta1.DeployModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeployModelRequest, com.google.longrunning.Operation> - getDeployModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.DeployModelRequest, com.google.longrunning.Operation> - getDeployModelMethod; - if ((getDeployModelMethod = AutoMlGrpc.getDeployModelMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getDeployModelMethod = AutoMlGrpc.getDeployModelMethod) == null) { - AutoMlGrpc.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.automl.v1beta1.DeployModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("DeployModel")) - .build(); - } - } - } - return getDeployModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UndeployModelRequest, com.google.longrunning.Operation> - getUndeployModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UndeployModel", - requestType = com.google.cloud.automl.v1beta1.UndeployModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UndeployModelRequest, com.google.longrunning.Operation> - getUndeployModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.UndeployModelRequest, com.google.longrunning.Operation> - getUndeployModelMethod; - if ((getUndeployModelMethod = AutoMlGrpc.getUndeployModelMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getUndeployModelMethod = AutoMlGrpc.getUndeployModelMethod) == null) { - AutoMlGrpc.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.automl.v1beta1.UndeployModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("UndeployModel")) - .build(); - } - } - } - return getUndeployModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportModelRequest, com.google.longrunning.Operation> - getExportModelMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ExportModel", - requestType = com.google.cloud.automl.v1beta1.ExportModelRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportModelRequest, com.google.longrunning.Operation> - getExportModelMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportModelRequest, com.google.longrunning.Operation> - getExportModelMethod; - if ((getExportModelMethod = AutoMlGrpc.getExportModelMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getExportModelMethod = AutoMlGrpc.getExportModelMethod) == null) { - AutoMlGrpc.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.automl.v1beta1.ExportModelRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("ExportModel")) - .build(); - } - } - } - return getExportModelMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, - com.google.longrunning.Operation> - getExportEvaluatedExamplesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ExportEvaluatedExamples", - requestType = com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, - com.google.longrunning.Operation> - getExportEvaluatedExamplesMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, - com.google.longrunning.Operation> - getExportEvaluatedExamplesMethod; - if ((getExportEvaluatedExamplesMethod = AutoMlGrpc.getExportEvaluatedExamplesMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getExportEvaluatedExamplesMethod = AutoMlGrpc.getExportEvaluatedExamplesMethod) - == null) { - AutoMlGrpc.getExportEvaluatedExamplesMethod = - getExportEvaluatedExamplesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ExportEvaluatedExamples")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new AutoMlMethodDescriptorSupplier("ExportEvaluatedExamples")) - .build(); - } - } - } - return getExportEvaluatedExamplesMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest, - com.google.cloud.automl.v1beta1.ModelEvaluation> - getGetModelEvaluationMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetModelEvaluation", - requestType = com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.class, - responseType = com.google.cloud.automl.v1beta1.ModelEvaluation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest, - com.google.cloud.automl.v1beta1.ModelEvaluation> - getGetModelEvaluationMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest, - com.google.cloud.automl.v1beta1.ModelEvaluation> - getGetModelEvaluationMethod; - if ((getGetModelEvaluationMethod = AutoMlGrpc.getGetModelEvaluationMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getGetModelEvaluationMethod = AutoMlGrpc.getGetModelEvaluationMethod) == null) { - AutoMlGrpc.getGetModelEvaluationMethod = - getGetModelEvaluationMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetModelEvaluation")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ModelEvaluation.getDefaultInstance())) - .setSchemaDescriptor(new AutoMlMethodDescriptorSupplier("GetModelEvaluation")) - .build(); - } - } - } - return getGetModelEvaluationMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest, - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse> - getListModelEvaluationsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListModelEvaluations", - requestType = com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.class, - responseType = com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest, - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse> - getListModelEvaluationsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest, - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse> - getListModelEvaluationsMethod; - if ((getListModelEvaluationsMethod = AutoMlGrpc.getListModelEvaluationsMethod) == null) { - synchronized (AutoMlGrpc.class) { - if ((getListModelEvaluationsMethod = AutoMlGrpc.getListModelEvaluationsMethod) == null) { - AutoMlGrpc.getListModelEvaluationsMethod = - getListModelEvaluationsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListModelEvaluations")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new AutoMlMethodDescriptorSupplier("ListModelEvaluations")) - .build(); - } - } - } - return getListModelEvaluationsMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static AutoMlStub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutoMlStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoMlStub(channel, callOptions); - } - }; - return AutoMlStub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static AutoMlBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutoMlBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoMlBlockingStub(channel, callOptions); - } - }; - return AutoMlBlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static AutoMlFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public AutoMlFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoMlFutureStub(channel, callOptions); - } - }; - return AutoMlFutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * AutoML Server API.
-   * The resource names are assigned by the server.
-   * The server never reuses names that it has created after the resources with
-   * those names are deleted.
-   * An ID of a resource is the last element of the item's resource name. For
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
-   * the id for the item is `{dataset_id}`.
-   * Currently the only supported `location_id` is "us-central1".
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public abstract static class AutoMlImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Creates a dataset.
-     * 
- */ - public void createDataset( - com.google.cloud.automl.v1beta1.CreateDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateDatasetMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a dataset.
-     * 
- */ - public void getDataset( - com.google.cloud.automl.v1beta1.GetDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetDatasetMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists datasets in a project.
-     * 
- */ - public void listDatasets( - com.google.cloud.automl.v1beta1.ListDatasetsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListDatasetsMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a dataset.
-     * 
- */ - public void updateDataset( - com.google.cloud.automl.v1beta1.UpdateDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateDatasetMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a dataset and all of its contents.
-     * Returns empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public void deleteDataset( - com.google.cloud.automl.v1beta1.DeleteDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteDatasetMethod(), responseObserver); - } - - /** - * - * - *
-     * Imports data into a dataset.
-     * For Tables this method can only be called on an empty Dataset.
-     * For Tables:
-     * *   A
-     * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params]
-     *     parameter must be explicitly set.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void importData( - com.google.cloud.automl.v1beta1.ImportDataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getImportDataMethod(), responseObserver); - } - - /** - * - * - *
-     * Exports dataset's data to the provided output location.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void exportData( - com.google.cloud.automl.v1beta1.ExportDataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getExportDataMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets an annotation spec.
-     * 
- */ - public void getAnnotationSpec( - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getGetAnnotationSpecMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a table spec.
-     * 
- */ - public void getTableSpec( - com.google.cloud.automl.v1beta1.GetTableSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetTableSpecMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists table specs in a dataset.
-     * 
- */ - public void listTableSpecs( - com.google.cloud.automl.v1beta1.ListTableSpecsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListTableSpecsMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a table spec.
-     * 
- */ - public void updateTableSpec( - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateTableSpecMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a column spec.
-     * 
- */ - public void getColumnSpec( - com.google.cloud.automl.v1beta1.GetColumnSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetColumnSpecMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists column specs in a table spec.
-     * 
- */ - public void listColumnSpecs( - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListColumnSpecsMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a column spec.
-     * 
- */ - public void updateColumnSpec( - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUpdateColumnSpecMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a model.
-     * Returns a Model in the [response][google.longrunning.Operation.response]
-     * field when it completes.
-     * When you create a model, several model evaluations are created for it:
-     * a global evaluation, and one evaluation for each annotation spec.
-     * 
- */ - public void createModel( - com.google.cloud.automl.v1beta1.CreateModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getCreateModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a model.
-     * 
- */ - public void getModel( - com.google.cloud.automl.v1beta1.GetModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getGetModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists models.
-     * 
- */ - public void listModels( - com.google.cloud.automl.v1beta1.ListModelsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListModelsMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a model.
-     * Returns `google.protobuf.Empty` in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public void deleteModel( - com.google.cloud.automl.v1beta1.DeleteModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeleteModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Deploys a model. If a model is already deployed, deploying it with the
-     * same parameters has no effect. Deploying with different parametrs
-     * (as e.g. changing
-     * [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number])
-     *  will reset the deployment state without pausing the model's availability.
-     * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage
-     * deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void deployModel( - com.google.cloud.automl.v1beta1.DeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getDeployModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Undeploys a model. If the model is not deployed this method has no effect.
-     * Only applicable for Text Classification, Image Object Detection and Tables;
-     * all other domains manage deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void undeployModel( - com.google.cloud.automl.v1beta1.UndeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getUndeployModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Exports a trained, "export-able", model to a user specified Google Cloud
-     * Storage location. A model is considered export-able if and only if it has
-     * an export format defined for it in
-     * [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void exportModel( - com.google.cloud.automl.v1beta1.ExportModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getExportModelMethod(), responseObserver); - } - - /** - * - * - *
-     * Exports examples on which the model was evaluated (i.e. which were in the
-     * TEST set of the dataset the model was created from), together with their
-     * ground truth annotations and the annotations created (predicted) by the
-     * model.
-     * The examples, ground truth and predictions are exported in the state
-     * they were at the moment the model was evaluated.
-     * This export is available only for 30 days since the model evaluation is
-     * created.
-     * Currently only available for Tables.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void exportEvaluatedExamples( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getExportEvaluatedExamplesMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets a model evaluation.
-     * 
- */ - public void getModelEvaluation( - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getGetModelEvaluationMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists model evaluations.
-     * 
- */ - public void listModelEvaluations( - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getListModelEvaluationsMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getCreateDatasetMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.CreateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset>(this, METHODID_CREATE_DATASET))) - .addMethod( - getGetDatasetMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.GetDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset>(this, METHODID_GET_DATASET))) - .addMethod( - getListDatasetsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ListDatasetsRequest, - com.google.cloud.automl.v1beta1.ListDatasetsResponse>( - this, METHODID_LIST_DATASETS))) - .addMethod( - getUpdateDatasetMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.UpdateDatasetRequest, - com.google.cloud.automl.v1beta1.Dataset>(this, METHODID_UPDATE_DATASET))) - .addMethod( - getDeleteDatasetMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.DeleteDatasetRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_DATASET))) - .addMethod( - getImportDataMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ImportDataRequest, - com.google.longrunning.Operation>(this, METHODID_IMPORT_DATA))) - .addMethod( - getExportDataMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ExportDataRequest, - com.google.longrunning.Operation>(this, METHODID_EXPORT_DATA))) - .addMethod( - getGetAnnotationSpecMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest, - com.google.cloud.automl.v1beta1.AnnotationSpec>( - this, METHODID_GET_ANNOTATION_SPEC))) - .addMethod( - getGetTableSpecMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.GetTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec>(this, METHODID_GET_TABLE_SPEC))) - .addMethod( - getListTableSpecsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ListTableSpecsRequest, - com.google.cloud.automl.v1beta1.ListTableSpecsResponse>( - this, METHODID_LIST_TABLE_SPECS))) - .addMethod( - getUpdateTableSpecMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest, - com.google.cloud.automl.v1beta1.TableSpec>(this, METHODID_UPDATE_TABLE_SPEC))) - .addMethod( - getGetColumnSpecMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.GetColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec>(this, METHODID_GET_COLUMN_SPEC))) - .addMethod( - getListColumnSpecsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest, - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse>( - this, METHODID_LIST_COLUMN_SPECS))) - .addMethod( - getUpdateColumnSpecMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest, - com.google.cloud.automl.v1beta1.ColumnSpec>( - this, METHODID_UPDATE_COLUMN_SPEC))) - .addMethod( - getCreateModelMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.CreateModelRequest, - com.google.longrunning.Operation>(this, METHODID_CREATE_MODEL))) - .addMethod( - getGetModelMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.GetModelRequest, - com.google.cloud.automl.v1beta1.Model>(this, METHODID_GET_MODEL))) - .addMethod( - getListModelsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ListModelsRequest, - com.google.cloud.automl.v1beta1.ListModelsResponse>( - this, METHODID_LIST_MODELS))) - .addMethod( - getDeleteModelMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.DeleteModelRequest, - com.google.longrunning.Operation>(this, METHODID_DELETE_MODEL))) - .addMethod( - getDeployModelMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.DeployModelRequest, - com.google.longrunning.Operation>(this, METHODID_DEPLOY_MODEL))) - .addMethod( - getUndeployModelMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.UndeployModelRequest, - com.google.longrunning.Operation>(this, METHODID_UNDEPLOY_MODEL))) - .addMethod( - getExportModelMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ExportModelRequest, - com.google.longrunning.Operation>(this, METHODID_EXPORT_MODEL))) - .addMethod( - getExportEvaluatedExamplesMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest, - com.google.longrunning.Operation>(this, METHODID_EXPORT_EVALUATED_EXAMPLES))) - .addMethod( - getGetModelEvaluationMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest, - com.google.cloud.automl.v1beta1.ModelEvaluation>( - this, METHODID_GET_MODEL_EVALUATION))) - .addMethod( - getListModelEvaluationsMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest, - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse>( - this, METHODID_LIST_MODEL_EVALUATIONS))) - .build(); - } - } - - /** - * - * - *
-   * AutoML Server API.
-   * The resource names are assigned by the server.
-   * The server never reuses names that it has created after the resources with
-   * those names are deleted.
-   * An ID of a resource is the last element of the item's resource name. For
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
-   * the id for the item is `{dataset_id}`.
-   * Currently the only supported `location_id` is "us-central1".
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public static final class AutoMlStub extends io.grpc.stub.AbstractAsyncStub { - private AutoMlStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutoMlStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoMlStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a dataset.
-     * 
- */ - public void createDataset( - com.google.cloud.automl.v1beta1.CreateDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getCreateDatasetMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a dataset.
-     * 
- */ - public void getDataset( - com.google.cloud.automl.v1beta1.GetDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetDatasetMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists datasets in a project.
-     * 
- */ - public void listDatasets( - com.google.cloud.automl.v1beta1.ListDatasetsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListDatasetsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a dataset.
-     * 
- */ - public void updateDataset( - com.google.cloud.automl.v1beta1.UpdateDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateDatasetMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a dataset and all of its contents.
-     * Returns empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public void deleteDataset( - com.google.cloud.automl.v1beta1.DeleteDatasetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeleteDatasetMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Imports data into a dataset.
-     * For Tables this method can only be called on an empty Dataset.
-     * For Tables:
-     * *   A
-     * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params]
-     *     parameter must be explicitly set.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void importData( - com.google.cloud.automl.v1beta1.ImportDataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getImportDataMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Exports dataset's data to the provided output location.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void exportData( - com.google.cloud.automl.v1beta1.ExportDataRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getExportDataMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Gets an annotation spec.
-     * 
- */ - public void getAnnotationSpec( - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetAnnotationSpecMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a table spec.
-     * 
- */ - public void getTableSpec( - com.google.cloud.automl.v1beta1.GetTableSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetTableSpecMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists table specs in a dataset.
-     * 
- */ - public void listTableSpecs( - com.google.cloud.automl.v1beta1.ListTableSpecsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListTableSpecsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a table spec.
-     * 
- */ - public void updateTableSpec( - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateTableSpecMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a column spec.
-     * 
- */ - public void getColumnSpec( - com.google.cloud.automl.v1beta1.GetColumnSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetColumnSpecMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists column specs in a table spec.
-     * 
- */ - public void listColumnSpecs( - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListColumnSpecsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a column spec.
-     * 
- */ - public void updateColumnSpec( - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUpdateColumnSpecMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a model.
-     * Returns a Model in the [response][google.longrunning.Operation.response]
-     * field when it completes.
-     * When you create a model, several model evaluations are created for it:
-     * a global evaluation, and one evaluation for each annotation spec.
-     * 
- */ - public void createModel( - com.google.cloud.automl.v1beta1.CreateModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getCreateModelMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a model.
-     * 
- */ - public void getModel( - com.google.cloud.automl.v1beta1.GetModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetModelMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists models.
-     * 
- */ - public void listModels( - com.google.cloud.automl.v1beta1.ListModelsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListModelsMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Deletes a model.
-     * Returns `google.protobuf.Empty` in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public void deleteModel( - com.google.cloud.automl.v1beta1.DeleteModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeleteModelMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deploys a model. If a model is already deployed, deploying it with the
-     * same parameters has no effect. Deploying with different parametrs
-     * (as e.g. changing
-     * [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number])
-     *  will reset the deployment state without pausing the model's availability.
-     * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage
-     * deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void deployModel( - com.google.cloud.automl.v1beta1.DeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getDeployModelMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Undeploys a model. If the model is not deployed this method has no effect.
-     * Only applicable for Text Classification, Image Object Detection and Tables;
-     * all other domains manage deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void undeployModel( - com.google.cloud.automl.v1beta1.UndeployModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getUndeployModelMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Exports a trained, "export-able", model to a user specified Google Cloud
-     * Storage location. A model is considered export-able if and only if it has
-     * an export format defined for it in
-     * [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void exportModel( - com.google.cloud.automl.v1beta1.ExportModelRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getExportModelMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Exports examples on which the model was evaluated (i.e. which were in the
-     * TEST set of the dataset the model was created from), together with their
-     * ground truth annotations and the annotations created (predicted) by the
-     * model.
-     * The examples, ground truth and predictions are exported in the state
-     * they were at the moment the model was evaluated.
-     * This export is available only for 30 days since the model evaluation is
-     * created.
-     * Currently only available for Tables.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public void exportEvaluatedExamples( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getExportEvaluatedExamplesMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets a model evaluation.
-     * 
- */ - public void getModelEvaluation( - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getGetModelEvaluationMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists model evaluations.
-     * 
- */ - public void listModelEvaluations( - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getListModelEvaluationsMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * AutoML Server API.
-   * The resource names are assigned by the server.
-   * The server never reuses names that it has created after the resources with
-   * those names are deleted.
-   * An ID of a resource is the last element of the item's resource name. For
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
-   * the id for the item is `{dataset_id}`.
-   * Currently the only supported `location_id` is "us-central1".
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public static final class AutoMlBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private AutoMlBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutoMlBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoMlBlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a dataset.
-     * 
- */ - public com.google.cloud.automl.v1beta1.Dataset createDataset( - com.google.cloud.automl.v1beta1.CreateDatasetRequest request) { - return blockingUnaryCall(getChannel(), getCreateDatasetMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a dataset.
-     * 
- */ - public com.google.cloud.automl.v1beta1.Dataset getDataset( - com.google.cloud.automl.v1beta1.GetDatasetRequest request) { - return blockingUnaryCall(getChannel(), getGetDatasetMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists datasets in a project.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ListDatasetsResponse listDatasets( - com.google.cloud.automl.v1beta1.ListDatasetsRequest request) { - return blockingUnaryCall(getChannel(), getListDatasetsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a dataset.
-     * 
- */ - public com.google.cloud.automl.v1beta1.Dataset updateDataset( - com.google.cloud.automl.v1beta1.UpdateDatasetRequest request) { - return blockingUnaryCall(getChannel(), getUpdateDatasetMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a dataset and all of its contents.
-     * Returns empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public com.google.longrunning.Operation deleteDataset( - com.google.cloud.automl.v1beta1.DeleteDatasetRequest request) { - return blockingUnaryCall(getChannel(), getDeleteDatasetMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Imports data into a dataset.
-     * For Tables this method can only be called on an empty Dataset.
-     * For Tables:
-     * *   A
-     * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params]
-     *     parameter must be explicitly set.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.longrunning.Operation importData( - com.google.cloud.automl.v1beta1.ImportDataRequest request) { - return blockingUnaryCall(getChannel(), getImportDataMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Exports dataset's data to the provided output location.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.longrunning.Operation exportData( - com.google.cloud.automl.v1beta1.ExportDataRequest request) { - return blockingUnaryCall(getChannel(), getExportDataMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets an annotation spec.
-     * 
- */ - public com.google.cloud.automl.v1beta1.AnnotationSpec getAnnotationSpec( - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest request) { - return blockingUnaryCall( - getChannel(), getGetAnnotationSpecMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a table spec.
-     * 
- */ - public com.google.cloud.automl.v1beta1.TableSpec getTableSpec( - com.google.cloud.automl.v1beta1.GetTableSpecRequest request) { - return blockingUnaryCall(getChannel(), getGetTableSpecMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists table specs in a dataset.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ListTableSpecsResponse listTableSpecs( - com.google.cloud.automl.v1beta1.ListTableSpecsRequest request) { - return blockingUnaryCall(getChannel(), getListTableSpecsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a table spec.
-     * 
- */ - public com.google.cloud.automl.v1beta1.TableSpec updateTableSpec( - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest request) { - return blockingUnaryCall(getChannel(), getUpdateTableSpecMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a column spec.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ColumnSpec getColumnSpec( - com.google.cloud.automl.v1beta1.GetColumnSpecRequest request) { - return blockingUnaryCall(getChannel(), getGetColumnSpecMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists column specs in a table spec.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ListColumnSpecsResponse listColumnSpecs( - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest request) { - return blockingUnaryCall(getChannel(), getListColumnSpecsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a column spec.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ColumnSpec updateColumnSpec( - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest request) { - return blockingUnaryCall( - getChannel(), getUpdateColumnSpecMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a model.
-     * Returns a Model in the [response][google.longrunning.Operation.response]
-     * field when it completes.
-     * When you create a model, several model evaluations are created for it:
-     * a global evaluation, and one evaluation for each annotation spec.
-     * 
- */ - public com.google.longrunning.Operation createModel( - com.google.cloud.automl.v1beta1.CreateModelRequest request) { - return blockingUnaryCall(getChannel(), getCreateModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a model.
-     * 
- */ - public com.google.cloud.automl.v1beta1.Model getModel( - com.google.cloud.automl.v1beta1.GetModelRequest request) { - return blockingUnaryCall(getChannel(), getGetModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists models.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ListModelsResponse listModels( - com.google.cloud.automl.v1beta1.ListModelsRequest request) { - return blockingUnaryCall(getChannel(), getListModelsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a model.
-     * Returns `google.protobuf.Empty` in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public com.google.longrunning.Operation deleteModel( - com.google.cloud.automl.v1beta1.DeleteModelRequest request) { - return blockingUnaryCall(getChannel(), getDeleteModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deploys a model. If a model is already deployed, deploying it with the
-     * same parameters has no effect. Deploying with different parametrs
-     * (as e.g. changing
-     * [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number])
-     *  will reset the deployment state without pausing the model's availability.
-     * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage
-     * deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.longrunning.Operation deployModel( - com.google.cloud.automl.v1beta1.DeployModelRequest request) { - return blockingUnaryCall(getChannel(), getDeployModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Undeploys a model. If the model is not deployed this method has no effect.
-     * Only applicable for Text Classification, Image Object Detection and Tables;
-     * all other domains manage deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.longrunning.Operation undeployModel( - com.google.cloud.automl.v1beta1.UndeployModelRequest request) { - return blockingUnaryCall(getChannel(), getUndeployModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Exports a trained, "export-able", model to a user specified Google Cloud
-     * Storage location. A model is considered export-able if and only if it has
-     * an export format defined for it in
-     * [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.longrunning.Operation exportModel( - com.google.cloud.automl.v1beta1.ExportModelRequest request) { - return blockingUnaryCall(getChannel(), getExportModelMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Exports examples on which the model was evaluated (i.e. which were in the
-     * TEST set of the dataset the model was created from), together with their
-     * ground truth annotations and the annotations created (predicted) by the
-     * model.
-     * The examples, ground truth and predictions are exported in the state
-     * they were at the moment the model was evaluated.
-     * This export is available only for 30 days since the model evaluation is
-     * created.
-     * Currently only available for Tables.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.longrunning.Operation exportEvaluatedExamples( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest request) { - return blockingUnaryCall( - getChannel(), getExportEvaluatedExamplesMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets a model evaluation.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ModelEvaluation getModelEvaluation( - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest request) { - return blockingUnaryCall( - getChannel(), getGetModelEvaluationMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists model evaluations.
-     * 
- */ - public com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse listModelEvaluations( - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest request) { - return blockingUnaryCall( - getChannel(), getListModelEvaluationsMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * AutoML Server API.
-   * The resource names are assigned by the server.
-   * The server never reuses names that it has created after the resources with
-   * those names are deleted.
-   * An ID of a resource is the last element of the item's resource name. For
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then
-   * the id for the item is `{dataset_id}`.
-   * Currently the only supported `location_id` is "us-central1".
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public static final class AutoMlFutureStub - extends io.grpc.stub.AbstractFutureStub { - private AutoMlFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected AutoMlFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new AutoMlFutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Creates a dataset.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.Dataset> - createDataset(com.google.cloud.automl.v1beta1.CreateDatasetRequest request) { - return futureUnaryCall( - getChannel().newCall(getCreateDatasetMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a dataset.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.Dataset> - getDataset(com.google.cloud.automl.v1beta1.GetDatasetRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetDatasetMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists datasets in a project.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ListDatasetsResponse> - listDatasets(com.google.cloud.automl.v1beta1.ListDatasetsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListDatasetsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a dataset.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.Dataset> - updateDataset(com.google.cloud.automl.v1beta1.UpdateDatasetRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateDatasetMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a dataset and all of its contents.
-     * Returns empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteDataset(com.google.cloud.automl.v1beta1.DeleteDatasetRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteDatasetMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Imports data into a dataset.
-     * For Tables this method can only be called on an empty Dataset.
-     * For Tables:
-     * *   A
-     * [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params]
-     *     parameter must be explicitly set.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - importData(com.google.cloud.automl.v1beta1.ImportDataRequest request) { - return futureUnaryCall( - getChannel().newCall(getImportDataMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Exports dataset's data to the provided output location.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportData(com.google.cloud.automl.v1beta1.ExportDataRequest request) { - return futureUnaryCall( - getChannel().newCall(getExportDataMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets an annotation spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.AnnotationSpec> - getAnnotationSpec(com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetAnnotationSpecMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a table spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.TableSpec> - getTableSpec(com.google.cloud.automl.v1beta1.GetTableSpecRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetTableSpecMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists table specs in a dataset.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ListTableSpecsResponse> - listTableSpecs(com.google.cloud.automl.v1beta1.ListTableSpecsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListTableSpecsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a table spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.TableSpec> - updateTableSpec(com.google.cloud.automl.v1beta1.UpdateTableSpecRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateTableSpecMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a column spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ColumnSpec> - getColumnSpec(com.google.cloud.automl.v1beta1.GetColumnSpecRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetColumnSpecMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists column specs in a table spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse> - listColumnSpecs(com.google.cloud.automl.v1beta1.ListColumnSpecsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListColumnSpecsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a column spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ColumnSpec> - updateColumnSpec(com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest request) { - return futureUnaryCall( - getChannel().newCall(getUpdateColumnSpecMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a model.
-     * Returns a Model in the [response][google.longrunning.Operation.response]
-     * field when it completes.
-     * When you create a model, several model evaluations are created for it:
-     * a global evaluation, and one evaluation for each annotation spec.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - createModel(com.google.cloud.automl.v1beta1.CreateModelRequest request) { - return futureUnaryCall( - getChannel().newCall(getCreateModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a model.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - getModel(com.google.cloud.automl.v1beta1.GetModelRequest request) { - return futureUnaryCall(getChannel().newCall(getGetModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists models.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ListModelsResponse> - listModels(com.google.cloud.automl.v1beta1.ListModelsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListModelsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a model.
-     * Returns `google.protobuf.Empty` in the
-     * [response][google.longrunning.Operation.response] field when it completes,
-     * and `delete_details` in the
-     * [metadata][google.longrunning.Operation.metadata] field.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteModel(com.google.cloud.automl.v1beta1.DeleteModelRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeleteModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deploys a model. If a model is already deployed, deploying it with the
-     * same parameters has no effect. Deploying with different parametrs
-     * (as e.g. changing
-     * [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number])
-     *  will reset the deployment state without pausing the model's availability.
-     * Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage
-     * deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deployModel(com.google.cloud.automl.v1beta1.DeployModelRequest request) { - return futureUnaryCall( - getChannel().newCall(getDeployModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Undeploys a model. If the model is not deployed this method has no effect.
-     * Only applicable for Text Classification, Image Object Detection and Tables;
-     * all other domains manage deployment automatically.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - undeployModel(com.google.cloud.automl.v1beta1.UndeployModelRequest request) { - return futureUnaryCall( - getChannel().newCall(getUndeployModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Exports a trained, "export-able", model to a user specified Google Cloud
-     * Storage location. A model is considered export-able if and only if it has
-     * an export format defined for it in
-     * [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportModel(com.google.cloud.automl.v1beta1.ExportModelRequest request) { - return futureUnaryCall( - getChannel().newCall(getExportModelMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Exports examples on which the model was evaluated (i.e. which were in the
-     * TEST set of the dataset the model was created from), together with their
-     * ground truth annotations and the annotations created (predicted) by the
-     * model.
-     * The examples, ground truth and predictions are exported in the state
-     * they were at the moment the model was evaluated.
-     * This export is available only for 30 days since the model evaluation is
-     * created.
-     * Currently only available for Tables.
-     * Returns an empty response in the
-     * [response][google.longrunning.Operation.response] field when it completes.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportEvaluatedExamples( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest request) { - return futureUnaryCall( - getChannel().newCall(getExportEvaluatedExamplesMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets a model evaluation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ModelEvaluation> - getModelEvaluation(com.google.cloud.automl.v1beta1.GetModelEvaluationRequest request) { - return futureUnaryCall( - getChannel().newCall(getGetModelEvaluationMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists model evaluations.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse> - listModelEvaluations(com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest request) { - return futureUnaryCall( - getChannel().newCall(getListModelEvaluationsMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_CREATE_DATASET = 0; - private static final int METHODID_GET_DATASET = 1; - private static final int METHODID_LIST_DATASETS = 2; - private static final int METHODID_UPDATE_DATASET = 3; - private static final int METHODID_DELETE_DATASET = 4; - private static final int METHODID_IMPORT_DATA = 5; - private static final int METHODID_EXPORT_DATA = 6; - private static final int METHODID_GET_ANNOTATION_SPEC = 7; - private static final int METHODID_GET_TABLE_SPEC = 8; - private static final int METHODID_LIST_TABLE_SPECS = 9; - private static final int METHODID_UPDATE_TABLE_SPEC = 10; - private static final int METHODID_GET_COLUMN_SPEC = 11; - private static final int METHODID_LIST_COLUMN_SPECS = 12; - private static final int METHODID_UPDATE_COLUMN_SPEC = 13; - private static final int METHODID_CREATE_MODEL = 14; - private static final int METHODID_GET_MODEL = 15; - private static final int METHODID_LIST_MODELS = 16; - private static final int METHODID_DELETE_MODEL = 17; - private static final int METHODID_DEPLOY_MODEL = 18; - private static final int METHODID_UNDEPLOY_MODEL = 19; - private static final int METHODID_EXPORT_MODEL = 20; - private static final int METHODID_EXPORT_EVALUATED_EXAMPLES = 21; - private static final int METHODID_GET_MODEL_EVALUATION = 22; - private static final int METHODID_LIST_MODEL_EVALUATIONS = 23; - - private static final class MethodHandlers - implements io.grpc.stub.ServerCalls.UnaryMethod, - io.grpc.stub.ServerCalls.ServerStreamingMethod, - io.grpc.stub.ServerCalls.ClientStreamingMethod, - io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final AutoMlImplBase serviceImpl; - private final int methodId; - - MethodHandlers(AutoMlImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_CREATE_DATASET: - serviceImpl.createDataset( - (com.google.cloud.automl.v1beta1.CreateDatasetRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_DATASET: - serviceImpl.getDataset( - (com.google.cloud.automl.v1beta1.GetDatasetRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_DATASETS: - serviceImpl.listDatasets( - (com.google.cloud.automl.v1beta1.ListDatasetsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_DATASET: - serviceImpl.updateDataset( - (com.google.cloud.automl.v1beta1.UpdateDatasetRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_DATASET: - serviceImpl.deleteDataset( - (com.google.cloud.automl.v1beta1.DeleteDatasetRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_IMPORT_DATA: - serviceImpl.importData( - (com.google.cloud.automl.v1beta1.ImportDataRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_EXPORT_DATA: - serviceImpl.exportData( - (com.google.cloud.automl.v1beta1.ExportDataRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_ANNOTATION_SPEC: - serviceImpl.getAnnotationSpec( - (com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_TABLE_SPEC: - serviceImpl.getTableSpec( - (com.google.cloud.automl.v1beta1.GetTableSpecRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_TABLE_SPECS: - serviceImpl.listTableSpecs( - (com.google.cloud.automl.v1beta1.ListTableSpecsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_TABLE_SPEC: - serviceImpl.updateTableSpec( - (com.google.cloud.automl.v1beta1.UpdateTableSpecRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_COLUMN_SPEC: - serviceImpl.getColumnSpec( - (com.google.cloud.automl.v1beta1.GetColumnSpecRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_COLUMN_SPECS: - serviceImpl.listColumnSpecs( - (com.google.cloud.automl.v1beta1.ListColumnSpecsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_COLUMN_SPEC: - serviceImpl.updateColumnSpec( - (com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_MODEL: - serviceImpl.createModel( - (com.google.cloud.automl.v1beta1.CreateModelRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_MODEL: - serviceImpl.getModel( - (com.google.cloud.automl.v1beta1.GetModelRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_MODELS: - serviceImpl.listModels( - (com.google.cloud.automl.v1beta1.ListModelsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_MODEL: - serviceImpl.deleteModel( - (com.google.cloud.automl.v1beta1.DeleteModelRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_DEPLOY_MODEL: - serviceImpl.deployModel( - (com.google.cloud.automl.v1beta1.DeployModelRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_UNDEPLOY_MODEL: - serviceImpl.undeployModel( - (com.google.cloud.automl.v1beta1.UndeployModelRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_EXPORT_MODEL: - serviceImpl.exportModel( - (com.google.cloud.automl.v1beta1.ExportModelRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_EXPORT_EVALUATED_EXAMPLES: - serviceImpl.exportEvaluatedExamples( - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_MODEL_EVALUATION: - serviceImpl.getModelEvaluation( - (com.google.cloud.automl.v1beta1.GetModelEvaluationRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_MODEL_EVALUATIONS: - serviceImpl.listModelEvaluations( - (com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse>) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class AutoMlBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - AutoMlBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("AutoMl"); - } - } - - private static final class AutoMlFileDescriptorSupplier extends AutoMlBaseDescriptorSupplier { - AutoMlFileDescriptorSupplier() {} - } - - private static final class AutoMlMethodDescriptorSupplier extends AutoMlBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - AutoMlMethodDescriptorSupplier(String methodName) { - this.methodName = methodName; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { - return getServiceDescriptor().findMethodByName(methodName); - } - } - - private static volatile io.grpc.ServiceDescriptor serviceDescriptor; - - public static io.grpc.ServiceDescriptor getServiceDescriptor() { - io.grpc.ServiceDescriptor result = serviceDescriptor; - if (result == null) { - synchronized (AutoMlGrpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new AutoMlFileDescriptorSupplier()) - .addMethod(getCreateDatasetMethod()) - .addMethod(getGetDatasetMethod()) - .addMethod(getListDatasetsMethod()) - .addMethod(getUpdateDatasetMethod()) - .addMethod(getDeleteDatasetMethod()) - .addMethod(getImportDataMethod()) - .addMethod(getExportDataMethod()) - .addMethod(getGetAnnotationSpecMethod()) - .addMethod(getGetTableSpecMethod()) - .addMethod(getListTableSpecsMethod()) - .addMethod(getUpdateTableSpecMethod()) - .addMethod(getGetColumnSpecMethod()) - .addMethod(getListColumnSpecsMethod()) - .addMethod(getUpdateColumnSpecMethod()) - .addMethod(getCreateModelMethod()) - .addMethod(getGetModelMethod()) - .addMethod(getListModelsMethod()) - .addMethod(getDeleteModelMethod()) - .addMethod(getDeployModelMethod()) - .addMethod(getUndeployModelMethod()) - .addMethod(getExportModelMethod()) - .addMethod(getExportEvaluatedExamplesMethod()) - .addMethod(getGetModelEvaluationMethod()) - .addMethod(getListModelEvaluationsMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceGrpc.java b/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceGrpc.java deleted file mode 100644 index 02b2f60b6..000000000 --- a/grpc-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceGrpc.java +++ /dev/null @@ -1,592 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.google.cloud.automl.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; -import static io.grpc.stub.ClientCalls.asyncUnaryCall; -import static io.grpc.stub.ClientCalls.blockingUnaryCall; -import static io.grpc.stub.ClientCalls.futureUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnaryCall; -import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; - -/** - * - * - *
- * AutoML Prediction API.
- * On any input that is documented to expect a string parameter in
- * snake_case or kebab-case, either of those cases is accepted.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/automl/v1beta1/prediction_service.proto") -public final class PredictionServiceGrpc { - - private PredictionServiceGrpc() {} - - public static final String SERVICE_NAME = "google.cloud.automl.v1beta1.PredictionService"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.PredictRequest, - com.google.cloud.automl.v1beta1.PredictResponse> - getPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "Predict", - requestType = com.google.cloud.automl.v1beta1.PredictRequest.class, - responseType = com.google.cloud.automl.v1beta1.PredictResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.PredictRequest, - com.google.cloud.automl.v1beta1.PredictResponse> - getPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.PredictRequest, - com.google.cloud.automl.v1beta1.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.automl.v1beta1.PredictRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.PredictResponse.getDefaultInstance())) - .setSchemaDescriptor(new PredictionServiceMethodDescriptorSupplier("Predict")) - .build(); - } - } - } - return getPredictMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.BatchPredictRequest, com.google.longrunning.Operation> - getBatchPredictMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "BatchPredict", - requestType = com.google.cloud.automl.v1beta1.BatchPredictRequest.class, - responseType = com.google.longrunning.Operation.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.BatchPredictRequest, com.google.longrunning.Operation> - getBatchPredictMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.automl.v1beta1.BatchPredictRequest, com.google.longrunning.Operation> - getBatchPredictMethod; - if ((getBatchPredictMethod = PredictionServiceGrpc.getBatchPredictMethod) == null) { - synchronized (PredictionServiceGrpc.class) { - if ((getBatchPredictMethod = PredictionServiceGrpc.getBatchPredictMethod) == null) { - PredictionServiceGrpc.getBatchPredictMethod = - getBatchPredictMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchPredict")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.automl.v1beta1.BatchPredictRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor( - new PredictionServiceMethodDescriptorSupplier("BatchPredict")) - .build(); - } - } - } - return getBatchPredictMethod; - } - - /** 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); - } - - /** - * - * - *
-   * AutoML Prediction API.
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public abstract static class PredictionServiceImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Perform an online prediction. The prediction result will be directly
-     * returned in the response.
-     * Available for following ML problems, and their expected request payloads:
-     * * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                          up to 30MB.
-     * * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                            up to 30MB.
-     * * Text Classification - TextSnippet, content up to 60,000 characters,
-     *                         UTF-8 encoded.
-     * * Text Extraction - TextSnippet, content up to 30,000 characters,
-     *                     UTF-8 NFC encoded.
-     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
-     *                 encoded.
-     * * Tables - Row, with column values matching the columns of the model,
-     *            up to 5MB. Not available for FORECASTING
-     * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type].
-     * * Text Sentiment - TextSnippet, content up 500 characters, UTF-8
-     *                     encoded.
-     * 
- */ - public void predict( - com.google.cloud.automl.v1beta1.PredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnimplementedUnaryCall(getPredictMethod(), responseObserver); - } - - /** - * - * - *
-     * Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch
-     * prediction result won't be immediately available in the response. Instead,
-     * a long running operation object is returned. User can poll the operation
-     * result via [GetOperation][google.longrunning.Operations.GetOperation]
-     * method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in
-     * the [response][google.longrunning.Operation.response] field.
-     * Available for following ML problems:
-     * * Image Classification
-     * * Image Object Detection
-     * * Video Classification
-     * * Video Object Tracking * Text Extraction
-     * * Tables
-     * 
- */ - public void batchPredict( - com.google.cloud.automl.v1beta1.BatchPredictRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getBatchPredictMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getPredictMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.PredictRequest, - com.google.cloud.automl.v1beta1.PredictResponse>(this, METHODID_PREDICT))) - .addMethod( - getBatchPredictMethod(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.automl.v1beta1.BatchPredictRequest, - com.google.longrunning.Operation>(this, METHODID_BATCH_PREDICT))) - .build(); - } - } - - /** - * - * - *
-   * AutoML Prediction API.
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public static final class PredictionServiceStub - extends io.grpc.stub.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. The prediction result will be directly
-     * returned in the response.
-     * Available for following ML problems, and their expected request payloads:
-     * * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                          up to 30MB.
-     * * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                            up to 30MB.
-     * * Text Classification - TextSnippet, content up to 60,000 characters,
-     *                         UTF-8 encoded.
-     * * Text Extraction - TextSnippet, content up to 30,000 characters,
-     *                     UTF-8 NFC encoded.
-     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
-     *                 encoded.
-     * * Tables - Row, with column values matching the columns of the model,
-     *            up to 5MB. Not available for FORECASTING
-     * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type].
-     * * Text Sentiment - TextSnippet, content up 500 characters, UTF-8
-     *                     encoded.
-     * 
- */ - public void predict( - com.google.cloud.automl.v1beta1.PredictRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - asyncUnaryCall( - getChannel().newCall(getPredictMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch
-     * prediction result won't be immediately available in the response. Instead,
-     * a long running operation object is returned. User can poll the operation
-     * result via [GetOperation][google.longrunning.Operations.GetOperation]
-     * method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in
-     * the [response][google.longrunning.Operation.response] field.
-     * Available for following ML problems:
-     * * Image Classification
-     * * Image Object Detection
-     * * Video Classification
-     * * Video Object Tracking * Text Extraction
-     * * Tables
-     * 
- */ - public void batchPredict( - com.google.cloud.automl.v1beta1.BatchPredictRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getBatchPredictMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * AutoML Prediction API.
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public static final class PredictionServiceBlockingStub - extends io.grpc.stub.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. The prediction result will be directly
-     * returned in the response.
-     * Available for following ML problems, and their expected request payloads:
-     * * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                          up to 30MB.
-     * * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                            up to 30MB.
-     * * Text Classification - TextSnippet, content up to 60,000 characters,
-     *                         UTF-8 encoded.
-     * * Text Extraction - TextSnippet, content up to 30,000 characters,
-     *                     UTF-8 NFC encoded.
-     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
-     *                 encoded.
-     * * Tables - Row, with column values matching the columns of the model,
-     *            up to 5MB. Not available for FORECASTING
-     * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type].
-     * * Text Sentiment - TextSnippet, content up 500 characters, UTF-8
-     *                     encoded.
-     * 
- */ - public com.google.cloud.automl.v1beta1.PredictResponse predict( - com.google.cloud.automl.v1beta1.PredictRequest request) { - return blockingUnaryCall(getChannel(), getPredictMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch
-     * prediction result won't be immediately available in the response. Instead,
-     * a long running operation object is returned. User can poll the operation
-     * result via [GetOperation][google.longrunning.Operations.GetOperation]
-     * method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in
-     * the [response][google.longrunning.Operation.response] field.
-     * Available for following ML problems:
-     * * Image Classification
-     * * Image Object Detection
-     * * Video Classification
-     * * Video Object Tracking * Text Extraction
-     * * Tables
-     * 
- */ - public com.google.longrunning.Operation batchPredict( - com.google.cloud.automl.v1beta1.BatchPredictRequest request) { - return blockingUnaryCall(getChannel(), getBatchPredictMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * AutoML Prediction API.
-   * On any input that is documented to expect a string parameter in
-   * snake_case or kebab-case, either of those cases is accepted.
-   * 
- */ - public static final class PredictionServiceFutureStub - extends io.grpc.stub.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. The prediction result will be directly
-     * returned in the response.
-     * Available for following ML problems, and their expected request payloads:
-     * * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                          up to 30MB.
-     * * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes
-     *                            up to 30MB.
-     * * Text Classification - TextSnippet, content up to 60,000 characters,
-     *                         UTF-8 encoded.
-     * * Text Extraction - TextSnippet, content up to 30,000 characters,
-     *                     UTF-8 NFC encoded.
-     * * Translation - TextSnippet, content up to 25,000 characters, UTF-8
-     *                 encoded.
-     * * Tables - Row, with column values matching the columns of the model,
-     *            up to 5MB. Not available for FORECASTING
-     * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type].
-     * * Text Sentiment - TextSnippet, content up 500 characters, UTF-8
-     *                     encoded.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.automl.v1beta1.PredictResponse> - predict(com.google.cloud.automl.v1beta1.PredictRequest request) { - return futureUnaryCall(getChannel().newCall(getPredictMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch
-     * prediction result won't be immediately available in the response. Instead,
-     * a long running operation object is returned. User can poll the operation
-     * result via [GetOperation][google.longrunning.Operations.GetOperation]
-     * method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in
-     * the [response][google.longrunning.Operation.response] field.
-     * Available for following ML problems:
-     * * Image Classification
-     * * Image Object Detection
-     * * Video Classification
-     * * Video Object Tracking * Text Extraction
-     * * Tables
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - batchPredict(com.google.cloud.automl.v1beta1.BatchPredictRequest request) { - return futureUnaryCall( - getChannel().newCall(getBatchPredictMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_PREDICT = 0; - private static final int METHODID_BATCH_PREDICT = 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 PredictionServiceImplBase serviceImpl; - private final int methodId; - - MethodHandlers(PredictionServiceImplBase serviceImpl, int methodId) { - this.serviceImpl = serviceImpl; - this.methodId = methodId; - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - case METHODID_PREDICT: - serviceImpl.predict( - (com.google.cloud.automl.v1beta1.PredictRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_BATCH_PREDICT: - serviceImpl.batchPredict( - (com.google.cloud.automl.v1beta1.BatchPredictRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class PredictionServiceBaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - PredictionServiceBaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.automl.v1beta1.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()) - .addMethod(getBatchPredictMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/pom.xml b/pom.xml index 141cca784..e82d7b45d 100644 --- a/pom.xml +++ b/pom.xml @@ -78,21 +78,11 @@ - - com.google.api.grpc - proto-google-cloud-automl-v1beta1 - 0.82.3-SNAPSHOT - com.google.api.grpc proto-google-cloud-automl-v1 1.1.3-SNAPSHOT - - com.google.api.grpc - grpc-google-cloud-automl-v1beta1 - 0.82.3-SNAPSHOT - com.google.api.grpc grpc-google-cloud-automl-v1 @@ -188,9 +178,7 @@ - proto-google-cloud-automl-v1beta1 proto-google-cloud-automl-v1 - grpc-google-cloud-automl-v1beta1 grpc-google-cloud-automl-v1 google-cloud-automl google-cloud-automl-bom diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayload.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayload.java index 2d23625c6..725a476ad 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayload.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationPayload.java @@ -278,6 +278,7 @@ public DetailCase getDetailCase() { * * @return Whether the translation field is set. */ + @java.lang.Override public boolean hasTranslation() { return detailCase_ == 2; } @@ -292,6 +293,7 @@ public boolean hasTranslation() { * * @return The translation. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationAnnotation getTranslation() { if (detailCase_ == 2) { return (com.google.cloud.automl.v1.TranslationAnnotation) detail_; @@ -307,6 +309,7 @@ public com.google.cloud.automl.v1.TranslationAnnotation getTranslation() { * * .google.cloud.automl.v1.TranslationAnnotation translation = 2; */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationAnnotationOrBuilder getTranslationOrBuilder() { if (detailCase_ == 2) { return (com.google.cloud.automl.v1.TranslationAnnotation) detail_; @@ -326,6 +329,7 @@ public com.google.cloud.automl.v1.TranslationAnnotationOrBuilder getTranslationO * * @return Whether the classification field is set. */ + @java.lang.Override public boolean hasClassification() { return detailCase_ == 3; } @@ -340,6 +344,7 @@ public boolean hasClassification() { * * @return The classification. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationAnnotation getClassification() { if (detailCase_ == 3) { return (com.google.cloud.automl.v1.ClassificationAnnotation) detail_; @@ -355,6 +360,7 @@ public com.google.cloud.automl.v1.ClassificationAnnotation getClassification() { * * .google.cloud.automl.v1.ClassificationAnnotation classification = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationAnnotationOrBuilder getClassificationOrBuilder() { if (detailCase_ == 3) { return (com.google.cloud.automl.v1.ClassificationAnnotation) detail_; @@ -374,6 +380,7 @@ public com.google.cloud.automl.v1.ClassificationAnnotationOrBuilder getClassific * * @return Whether the imageObjectDetection field is set. */ + @java.lang.Override public boolean hasImageObjectDetection() { return detailCase_ == 4; } @@ -388,6 +395,7 @@ public boolean hasImageObjectDetection() { * * @return The imageObjectDetection. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionAnnotation getImageObjectDetection() { if (detailCase_ == 4) { return (com.google.cloud.automl.v1.ImageObjectDetectionAnnotation) detail_; @@ -403,6 +411,7 @@ public com.google.cloud.automl.v1.ImageObjectDetectionAnnotation getImageObjectD * * .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4; */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionAnnotationOrBuilder getImageObjectDetectionOrBuilder() { if (detailCase_ == 4) { @@ -423,6 +432,7 @@ public com.google.cloud.automl.v1.ImageObjectDetectionAnnotation getImageObjectD * * @return Whether the textExtraction field is set. */ + @java.lang.Override public boolean hasTextExtraction() { return detailCase_ == 6; } @@ -437,6 +447,7 @@ public boolean hasTextExtraction() { * * @return The textExtraction. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionAnnotation getTextExtraction() { if (detailCase_ == 6) { return (com.google.cloud.automl.v1.TextExtractionAnnotation) detail_; @@ -452,6 +463,7 @@ public com.google.cloud.automl.v1.TextExtractionAnnotation getTextExtraction() { * * .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6; */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionAnnotationOrBuilder getTextExtractionOrBuilder() { if (detailCase_ == 6) { return (com.google.cloud.automl.v1.TextExtractionAnnotation) detail_; @@ -471,6 +483,7 @@ public com.google.cloud.automl.v1.TextExtractionAnnotationOrBuilder getTextExtra * * @return Whether the textSentiment field is set. */ + @java.lang.Override public boolean hasTextSentiment() { return detailCase_ == 7; } @@ -485,6 +498,7 @@ public boolean hasTextSentiment() { * * @return The textSentiment. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentAnnotation getTextSentiment() { if (detailCase_ == 7) { return (com.google.cloud.automl.v1.TextSentimentAnnotation) detail_; @@ -500,6 +514,7 @@ public com.google.cloud.automl.v1.TextSentimentAnnotation getTextSentiment() { * * .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentAnnotationOrBuilder getTextSentimentOrBuilder() { if (detailCase_ == 7) { return (com.google.cloud.automl.v1.TextSentimentAnnotation) detail_; @@ -522,6 +537,7 @@ public com.google.cloud.automl.v1.TextSentimentAnnotationOrBuilder getTextSentim * * @return The annotationSpecId. */ + @java.lang.Override public java.lang.String getAnnotationSpecId() { java.lang.Object ref = annotationSpecId_; if (ref instanceof java.lang.String) { @@ -546,6 +562,7 @@ public java.lang.String getAnnotationSpecId() { * * @return The bytes for annotationSpecId. */ + @java.lang.Override public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { java.lang.Object ref = annotationSpecId_; if (ref instanceof java.lang.String) { @@ -576,6 +593,7 @@ public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { * * @return The displayName. */ + @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { @@ -603,6 +621,7 @@ public java.lang.String getDisplayName() { * * @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) { @@ -1130,6 +1149,7 @@ public Builder clearDetail() { * * @return Whether the translation field is set. */ + @java.lang.Override public boolean hasTranslation() { return detailCase_ == 2; } @@ -1144,6 +1164,7 @@ public boolean hasTranslation() { * * @return The translation. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationAnnotation getTranslation() { if (translationBuilder_ == null) { if (detailCase_ == 2) { @@ -1276,6 +1297,7 @@ public com.google.cloud.automl.v1.TranslationAnnotation.Builder getTranslationBu * * .google.cloud.automl.v1.TranslationAnnotation translation = 2; */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationAnnotationOrBuilder getTranslationOrBuilder() { if ((detailCase_ == 2) && (translationBuilder_ != null)) { return translationBuilder_.getMessageOrBuilder(); @@ -1336,6 +1358,7 @@ public com.google.cloud.automl.v1.TranslationAnnotationOrBuilder getTranslationO * * @return Whether the classification field is set. */ + @java.lang.Override public boolean hasClassification() { return detailCase_ == 3; } @@ -1350,6 +1373,7 @@ public boolean hasClassification() { * * @return The classification. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationAnnotation getClassification() { if (classificationBuilder_ == null) { if (detailCase_ == 3) { @@ -1483,6 +1507,7 @@ public com.google.cloud.automl.v1.ClassificationAnnotation.Builder getClassifica * * .google.cloud.automl.v1.ClassificationAnnotation classification = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationAnnotationOrBuilder getClassificationOrBuilder() { if ((detailCase_ == 3) && (classificationBuilder_ != null)) { @@ -1545,6 +1570,7 @@ public com.google.cloud.automl.v1.ClassificationAnnotation.Builder getClassifica * * @return Whether the imageObjectDetection field is set. */ + @java.lang.Override public boolean hasImageObjectDetection() { return detailCase_ == 4; } @@ -1560,6 +1586,7 @@ public boolean hasImageObjectDetection() { * * @return The imageObjectDetection. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionAnnotation getImageObjectDetection() { if (imageObjectDetectionBuilder_ == null) { if (detailCase_ == 4) { @@ -1702,6 +1729,7 @@ public Builder clearImageObjectDetection() { * .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionAnnotationOrBuilder getImageObjectDetectionOrBuilder() { if ((detailCase_ == 4) && (imageObjectDetectionBuilder_ != null)) { @@ -1764,6 +1792,7 @@ public Builder clearImageObjectDetection() { * * @return Whether the textExtraction field is set. */ + @java.lang.Override public boolean hasTextExtraction() { return detailCase_ == 6; } @@ -1778,6 +1807,7 @@ public boolean hasTextExtraction() { * * @return The textExtraction. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionAnnotation getTextExtraction() { if (textExtractionBuilder_ == null) { if (detailCase_ == 6) { @@ -1911,6 +1941,7 @@ public com.google.cloud.automl.v1.TextExtractionAnnotation.Builder getTextExtrac * * .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6; */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionAnnotationOrBuilder getTextExtractionOrBuilder() { if ((detailCase_ == 6) && (textExtractionBuilder_ != null)) { @@ -1972,6 +2003,7 @@ public com.google.cloud.automl.v1.TextExtractionAnnotation.Builder getTextExtrac * * @return Whether the textSentiment field is set. */ + @java.lang.Override public boolean hasTextSentiment() { return detailCase_ == 7; } @@ -1986,6 +2018,7 @@ public boolean hasTextSentiment() { * * @return The textSentiment. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentAnnotation getTextSentiment() { if (textSentimentBuilder_ == null) { if (detailCase_ == 7) { @@ -2118,6 +2151,7 @@ public com.google.cloud.automl.v1.TextSentimentAnnotation.Builder getTextSentime * * .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentAnnotationOrBuilder getTextSentimentOrBuilder() { if ((detailCase_ == 7) && (textSentimentBuilder_ != null)) { return textSentimentBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationSpec.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationSpec.java index 614b5bb84..4e5a1d486 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationSpec.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/AnnotationSpec.java @@ -139,6 +139,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -163,6 +164,7 @@ public java.lang.String getName() { * * @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) { @@ -189,6 +191,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return The displayName. */ + @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { @@ -212,6 +215,7 @@ public java.lang.String getDisplayName() { * * @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) { @@ -238,6 +242,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * @return The exampleCount. */ + @java.lang.Override public int getExampleCount() { return exampleCount_; } @@ -829,6 +834,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { * * @return The exampleCount. */ + @java.lang.Override public int getExampleCount() { return exampleCount_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictInputConfig.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictInputConfig.java index 0bf82ec32..d985372b9 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictInputConfig.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictInputConfig.java @@ -381,6 +381,7 @@ public SourceCase getSourceCase() { * * @return Whether the gcsSource field is set. */ + @java.lang.Override public boolean hasGcsSource() { return sourceCase_ == 1; } @@ -397,6 +398,7 @@ public boolean hasGcsSource() { * * @return The gcsSource. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSource getGcsSource() { if (sourceCase_ == 1) { return (com.google.cloud.automl.v1.GcsSource) source_; @@ -414,6 +416,7 @@ public com.google.cloud.automl.v1.GcsSource getGcsSource() { * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { if (sourceCase_ == 1) { return (com.google.cloud.automl.v1.GcsSource) source_; @@ -1005,6 +1008,7 @@ public Builder clearSource() { * * @return Whether the gcsSource field is set. */ + @java.lang.Override public boolean hasGcsSource() { return sourceCase_ == 1; } @@ -1021,6 +1025,7 @@ public boolean hasGcsSource() { * * @return The gcsSource. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSource getGcsSource() { if (gcsSourceBuilder_ == null) { if (sourceCase_ == 1) { @@ -1164,6 +1169,7 @@ public com.google.cloud.automl.v1.GcsSource.Builder getGcsSourceBuilder() { * .google.cloud.automl.v1.GcsSource gcs_source = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { return gcsSourceBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOperationMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOperationMetadata.java index 0053c7263..c39b6d357 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOperationMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOperationMetadata.java @@ -774,6 +774,7 @@ public Builder clearOutputLocation() { * * @return The gcsOutputDirectory. */ + @java.lang.Override public java.lang.String getGcsOutputDirectory() { java.lang.Object ref = ""; if (outputLocationCase_ == 1) { @@ -802,6 +803,7 @@ public java.lang.String getGcsOutputDirectory() { * * @return The bytes for gcsOutputDirectory. */ + @java.lang.Override public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { java.lang.Object ref = ""; if (outputLocationCase_ == 1) { @@ -955,6 +957,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return Whether the inputConfig field is set. */ + @java.lang.Override public boolean hasInputConfig() { return inputConfig_ != null; } @@ -970,6 +973,7 @@ public boolean hasInputConfig() { * * @return The inputConfig. */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictInputConfig getInputConfig() { return inputConfig_ == null ? com.google.cloud.automl.v1.BatchPredictInputConfig.getDefaultInstance() @@ -985,6 +989,7 @@ public com.google.cloud.automl.v1.BatchPredictInputConfig getInputConfig() { * * .google.cloud.automl.v1.BatchPredictInputConfig input_config = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictInputConfigOrBuilder getInputConfigOrBuilder() { return getInputConfig(); } @@ -1005,6 +1010,7 @@ public com.google.cloud.automl.v1.BatchPredictInputConfigOrBuilder getInputConfi * * @return Whether the outputInfo field is set. */ + @java.lang.Override public boolean hasOutputInfo() { return outputInfo_ != null; } @@ -1021,6 +1027,7 @@ public boolean hasOutputInfo() { * * @return The outputInfo. */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo getOutputInfo() { return outputInfo_ == null @@ -1039,6 +1046,7 @@ public boolean hasOutputInfo() { * .google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOperationMetadata.BatchPredictOutputInfoOrBuilder getOutputInfoOrBuilder() { return getOutputInfo(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOutputConfig.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOutputConfig.java index 455002435..2dedd3620 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOutputConfig.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictOutputConfig.java @@ -417,6 +417,7 @@ public DestinationCase getDestinationCase() { * * @return Whether the gcsDestination field is set. */ + @java.lang.Override public boolean hasGcsDestination() { return destinationCase_ == 1; } @@ -434,6 +435,7 @@ public boolean hasGcsDestination() { * * @return The gcsDestination. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { if (destinationCase_ == 1) { return (com.google.cloud.automl.v1.GcsDestination) destination_; @@ -452,6 +454,7 @@ public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { * .google.cloud.automl.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { if (destinationCase_ == 1) { return (com.google.cloud.automl.v1.GcsDestination) destination_; @@ -1079,6 +1082,7 @@ public Builder clearDestination() { * * @return Whether the gcsDestination field is set. */ + @java.lang.Override public boolean hasGcsDestination() { return destinationCase_ == 1; } @@ -1096,6 +1100,7 @@ public boolean hasGcsDestination() { * * @return The gcsDestination. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { if (gcsDestinationBuilder_ == null) { if (destinationCase_ == 1) { @@ -1246,6 +1251,7 @@ public com.google.cloud.automl.v1.GcsDestination.Builder getGcsDestinationBuilde * .google.cloud.automl.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { return gcsDestinationBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictRequest.java index b0af33733..b5c79ea14 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictRequest.java @@ -185,6 +185,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -209,6 +210,7 @@ public java.lang.String getName() { * * @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) { @@ -236,6 +238,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the inputConfig field is set. */ + @java.lang.Override public boolean hasInputConfig() { return inputConfig_ != null; } @@ -252,6 +255,7 @@ public boolean hasInputConfig() { * * @return The inputConfig. */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictInputConfig getInputConfig() { return inputConfig_ == null ? com.google.cloud.automl.v1.BatchPredictInputConfig.getDefaultInstance() @@ -268,6 +272,7 @@ public com.google.cloud.automl.v1.BatchPredictInputConfig getInputConfig() { * .google.cloud.automl.v1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictInputConfigOrBuilder getInputConfigOrBuilder() { return getInputConfig(); } @@ -288,6 +293,7 @@ public com.google.cloud.automl.v1.BatchPredictInputConfigOrBuilder getInputConfi * * @return Whether the outputConfig field is set. */ + @java.lang.Override public boolean hasOutputConfig() { return outputConfig_ != null; } @@ -305,6 +311,7 @@ public boolean hasOutputConfig() { * * @return The outputConfig. */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOutputConfig getOutputConfig() { return outputConfig_ == null ? com.google.cloud.automl.v1.BatchPredictOutputConfig.getDefaultInstance() @@ -322,6 +329,7 @@ public com.google.cloud.automl.v1.BatchPredictOutputConfig getOutputConfig() { * .google.cloud.automl.v1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOutputConfigOrBuilder getOutputConfigOrBuilder() { return getOutputConfig(); } @@ -424,6 +432,7 @@ public int getParamsCount() { * * map<string, string> params = 5; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -431,6 +440,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -508,6 +518,7 @@ public java.util.Map getParams() { * * map<string, string> params = 5; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -584,6 +595,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 5; */ + @java.lang.Override public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -664,6 +676,7 @@ public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> params = 5; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1722,6 +1735,7 @@ public int getParamsCount() { * * map<string, string> params = 5; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1729,6 +1743,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -1806,6 +1821,7 @@ public java.util.Map getParams() { * * map<string, string> params = 5; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -1882,6 +1898,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 5; */ + @java.lang.Override public java.lang.String getParamsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1963,6 +1980,7 @@ public java.lang.String getParamsOrDefault( * * map<string, string> params = 5; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictResult.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictResult.java index 9dc76a46a..dbb32814d 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictResult.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BatchPredictResult.java @@ -171,6 +171,7 @@ public int getMetadataCount() { * * map<string, string> metadata = 1; */ + @java.lang.Override public boolean containsMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -178,6 +179,7 @@ public boolean containsMetadata(java.lang.String key) { return internalGetMetadata().getMap().containsKey(key); } /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); @@ -197,6 +199,7 @@ public java.util.Map getMetadata() { * * map<string, string> metadata = 1; */ + @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } @@ -215,6 +218,7 @@ public java.util.Map getMetadataMap() { * * map<string, string> metadata = 1; */ + @java.lang.Override public java.lang.String getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -238,6 +242,7 @@ public java.lang.String getMetadataOrDefault( * * map<string, string> metadata = 1; */ + @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -636,6 +641,7 @@ public int getMetadataCount() { * * map<string, string> metadata = 1; */ + @java.lang.Override public boolean containsMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -643,6 +649,7 @@ public boolean containsMetadata(java.lang.String key) { return internalGetMetadata().getMap().containsKey(key); } /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); @@ -662,6 +669,7 @@ public java.util.Map getMetadata() { * * map<string, string> metadata = 1; */ + @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } @@ -680,6 +688,7 @@ public java.util.Map getMetadataMap() { * * map<string, string> metadata = 1; */ + @java.lang.Override public java.lang.String getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -703,6 +712,7 @@ public java.lang.String getMetadataOrDefault( * * map<string, string> metadata = 1; */ + @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingBoxMetricsEntry.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingBoxMetricsEntry.java index c78eb7eba..91d10f159 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingBoxMetricsEntry.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingBoxMetricsEntry.java @@ -311,6 +311,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The confidenceThreshold. */ + @java.lang.Override public float getConfidenceThreshold() { return confidenceThreshold_; } @@ -328,6 +329,7 @@ public float getConfidenceThreshold() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -345,6 +347,7 @@ public float getRecall() { * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -362,6 +365,7 @@ public float getPrecision() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -768,6 +772,7 @@ public Builder mergeFrom( * * @return The confidenceThreshold. */ + @java.lang.Override public float getConfidenceThreshold() { return confidenceThreshold_; } @@ -819,6 +824,7 @@ public Builder clearConfidenceThreshold() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -870,6 +876,7 @@ public Builder clearRecall() { * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -921,6 +928,7 @@ public Builder clearPrecision() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -1030,6 +1038,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return The iouThreshold. */ + @java.lang.Override public float getIouThreshold() { return iouThreshold_; } @@ -1047,6 +1056,7 @@ public float getIouThreshold() { * * @return The meanAveragePrecision. */ + @java.lang.Override public float getMeanAveragePrecision() { return meanAveragePrecision_; } @@ -1067,6 +1077,7 @@ public float getMeanAveragePrecision() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; * */ + @java.lang.Override public java.util.List getConfidenceMetricsEntriesList() { return confidenceMetricsEntries_; @@ -1084,6 +1095,7 @@ public float getMeanAveragePrecision() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; * */ + @java.lang.Override public java.util.List< ? extends com.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder> @@ -1103,6 +1115,7 @@ public float getMeanAveragePrecision() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; * */ + @java.lang.Override public int getConfidenceMetricsEntriesCount() { return confidenceMetricsEntries_.size(); } @@ -1119,6 +1132,7 @@ public int getConfidenceMetricsEntriesCount() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; * */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry getConfidenceMetricsEntries(int index) { return confidenceMetricsEntries_.get(index); @@ -1136,6 +1150,7 @@ public int getConfidenceMetricsEntriesCount() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; * */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder getConfidenceMetricsEntriesOrBuilder(int index) { return confidenceMetricsEntries_.get(index); @@ -1551,6 +1566,7 @@ public Builder mergeFrom( * * @return The iouThreshold. */ + @java.lang.Override public float getIouThreshold() { return iouThreshold_; } @@ -1604,6 +1620,7 @@ public Builder clearIouThreshold() { * * @return The meanAveragePrecision. */ + @java.lang.Override public float getMeanAveragePrecision() { return meanAveragePrecision_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingPoly.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingPoly.java index 9de6fda48..cac83c27e 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingPoly.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/BoundingPoly.java @@ -133,6 +133,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.cloud.automl.v1.NormalizedVertex normalized_vertices = 2; */ + @java.lang.Override public java.util.List getNormalizedVerticesList() { return normalizedVertices_; } @@ -145,6 +146,7 @@ public java.util.List getNormalized * * repeated .google.cloud.automl.v1.NormalizedVertex normalized_vertices = 2; */ + @java.lang.Override public java.util.List getNormalizedVerticesOrBuilderList() { return normalizedVertices_; @@ -158,6 +160,7 @@ public java.util.List getNormalized * * repeated .google.cloud.automl.v1.NormalizedVertex normalized_vertices = 2; */ + @java.lang.Override public int getNormalizedVerticesCount() { return normalizedVertices_.size(); } @@ -170,6 +173,7 @@ public int getNormalizedVerticesCount() { * * repeated .google.cloud.automl.v1.NormalizedVertex normalized_vertices = 2; */ + @java.lang.Override public com.google.cloud.automl.v1.NormalizedVertex getNormalizedVertices(int index) { return normalizedVertices_.get(index); } @@ -182,6 +186,7 @@ public com.google.cloud.automl.v1.NormalizedVertex getNormalizedVertices(int ind * * repeated .google.cloud.automl.v1.NormalizedVertex normalized_vertices = 2; */ + @java.lang.Override public com.google.cloud.automl.v1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( int index) { return normalizedVertices_.get(index); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationAnnotation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationAnnotation.java index 036538a22..7a0b4ed82 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationAnnotation.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationAnnotation.java @@ -124,6 +124,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The score. */ + @java.lang.Override public float getScore() { return score_; } @@ -462,6 +463,7 @@ public Builder mergeFrom( * * @return The score. */ + @java.lang.Override public float getScore() { return score_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationEvaluationMetrics.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationEvaluationMetrics.java index 9a02a81fd..ac1d4d9b8 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationEvaluationMetrics.java @@ -547,6 +547,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The confidenceThreshold. */ + @java.lang.Override public float getConfidenceThreshold() { return confidenceThreshold_; } @@ -566,6 +567,7 @@ public float getConfidenceThreshold() { * * @return The positionThreshold. */ + @java.lang.Override public int getPositionThreshold() { return positionThreshold_; } @@ -584,6 +586,7 @@ public int getPositionThreshold() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -601,6 +604,7 @@ public float getRecall() { * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -618,6 +622,7 @@ public float getPrecision() { * * @return The falsePositiveRate. */ + @java.lang.Override public float getFalsePositiveRate() { return falsePositiveRate_; } @@ -635,6 +640,7 @@ public float getFalsePositiveRate() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -654,6 +660,7 @@ public float getF1Score() { * * @return The recallAt1. */ + @java.lang.Override public float getRecallAt1() { return recallAt1_; } @@ -673,6 +680,7 @@ public float getRecallAt1() { * * @return The precisionAt1. */ + @java.lang.Override public float getPrecisionAt1() { return precisionAt1_; } @@ -692,6 +700,7 @@ public float getPrecisionAt1() { * * @return The falsePositiveRateAt1. */ + @java.lang.Override public float getFalsePositiveRateAt1() { return falsePositiveRateAt1_; } @@ -709,6 +718,7 @@ public float getFalsePositiveRateAt1() { * * @return The f1ScoreAt1. */ + @java.lang.Override public float getF1ScoreAt1() { return f1ScoreAt1_; } @@ -727,6 +737,7 @@ public float getF1ScoreAt1() { * * @return The truePositiveCount. */ + @java.lang.Override public long getTruePositiveCount() { return truePositiveCount_; } @@ -745,6 +756,7 @@ public long getTruePositiveCount() { * * @return The falsePositiveCount. */ + @java.lang.Override public long getFalsePositiveCount() { return falsePositiveCount_; } @@ -763,6 +775,7 @@ public long getFalsePositiveCount() { * * @return The falseNegativeCount. */ + @java.lang.Override public long getFalseNegativeCount() { return falseNegativeCount_; } @@ -781,6 +794,7 @@ public long getFalseNegativeCount() { * * @return The trueNegativeCount. */ + @java.lang.Override public long getTrueNegativeCount() { return trueNegativeCount_; } @@ -1351,6 +1365,7 @@ public Builder mergeFrom( * * @return The confidenceThreshold. */ + @java.lang.Override public float getConfidenceThreshold() { return confidenceThreshold_; } @@ -1406,6 +1421,7 @@ public Builder clearConfidenceThreshold() { * * @return The positionThreshold. */ + @java.lang.Override public int getPositionThreshold() { return positionThreshold_; } @@ -1462,6 +1478,7 @@ public Builder clearPositionThreshold() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -1515,6 +1532,7 @@ public Builder clearRecall() { * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -1566,6 +1584,7 @@ public Builder clearPrecision() { * * @return The falsePositiveRate. */ + @java.lang.Override public float getFalsePositiveRate() { return falsePositiveRate_; } @@ -1617,6 +1636,7 @@ public Builder clearFalsePositiveRate() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -1670,6 +1690,7 @@ public Builder clearF1Score() { * * @return The recallAt1. */ + @java.lang.Override public float getRecallAt1() { return recallAt1_; } @@ -1727,6 +1748,7 @@ public Builder clearRecallAt1() { * * @return The precisionAt1. */ + @java.lang.Override public float getPrecisionAt1() { return precisionAt1_; } @@ -1784,6 +1806,7 @@ public Builder clearPrecisionAt1() { * * @return The falsePositiveRateAt1. */ + @java.lang.Override public float getFalsePositiveRateAt1() { return falsePositiveRateAt1_; } @@ -1839,6 +1862,7 @@ public Builder clearFalsePositiveRateAt1() { * * @return The f1ScoreAt1. */ + @java.lang.Override public float getF1ScoreAt1() { return f1ScoreAt1_; } @@ -1891,6 +1915,7 @@ public Builder clearF1ScoreAt1() { * * @return The truePositiveCount. */ + @java.lang.Override public long getTruePositiveCount() { return truePositiveCount_; } @@ -1945,6 +1970,7 @@ public Builder clearTruePositiveCount() { * * @return The falsePositiveCount. */ + @java.lang.Override public long getFalsePositiveCount() { return falsePositiveCount_; } @@ -1999,6 +2025,7 @@ public Builder clearFalsePositiveCount() { * * @return The falseNegativeCount. */ + @java.lang.Override public long getFalseNegativeCount() { return falseNegativeCount_; } @@ -2053,6 +2080,7 @@ public Builder clearFalseNegativeCount() { * * @return The trueNegativeCount. */ + @java.lang.Override public long getTrueNegativeCount() { return trueNegativeCount_; } @@ -2698,6 +2726,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return A list containing the exampleCount. */ + @java.lang.Override public java.util.List getExampleCountList() { return exampleCount_; } @@ -3499,6 +3528,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes(int index) { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; * */ + @java.lang.Override public java.util.List< com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row> getRowList() { @@ -3519,6 +3549,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes(int index) { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; * */ + @java.lang.Override public java.util.List< ? extends com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix @@ -3541,6 +3572,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes(int index) { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; * */ + @java.lang.Override public int getRowCount() { return row_.size(); } @@ -3559,6 +3591,7 @@ public int getRowCount() { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row getRow( int index) { return row_.get(index); @@ -3578,6 +3611,7 @@ public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatri * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder getRowOrBuilder(int index) { return row_.get(index); @@ -5010,6 +5044,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return The auPrc. */ + @java.lang.Override public float getAuPrc() { return auPrc_; } @@ -5028,6 +5063,7 @@ public float getAuPrc() { * * @return The auRoc. */ + @java.lang.Override public float getAuRoc() { return auRoc_; } @@ -5045,6 +5081,7 @@ public float getAuRoc() { * * @return The logLoss. */ + @java.lang.Override public float getLogLoss() { return logLoss_; } @@ -5070,6 +5107,7 @@ public float getLogLoss() { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; * */ + @java.lang.Override public java.util.List< com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry> getConfidenceMetricsEntryList() { @@ -5092,6 +5130,7 @@ public float getLogLoss() { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; * */ + @java.lang.Override public java.util.List< ? extends com.google.cloud.automl.v1.ClassificationEvaluationMetrics @@ -5116,6 +5155,7 @@ public float getLogLoss() { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; * */ + @java.lang.Override public int getConfidenceMetricsEntryCount() { return confidenceMetricsEntry_.size(); } @@ -5136,6 +5176,7 @@ public int getConfidenceMetricsEntryCount() { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry getConfidenceMetricsEntry(int index) { return confidenceMetricsEntry_.get(index); @@ -5157,6 +5198,7 @@ public int getConfidenceMetricsEntryCount() { * repeated .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder getConfidenceMetricsEntryOrBuilder(int index) { return confidenceMetricsEntry_.get(index); @@ -5181,6 +5223,7 @@ public int getConfidenceMetricsEntryCount() { * * @return Whether the confusionMatrix field is set. */ + @java.lang.Override public boolean hasConfusionMatrix() { return confusionMatrix_ != null; } @@ -5200,6 +5243,7 @@ public boolean hasConfusionMatrix() { * * @return The confusionMatrix. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix getConfusionMatrix() { return confusionMatrix_ == null @@ -5221,6 +5265,7 @@ public boolean hasConfusionMatrix() { * .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder getConfusionMatrixOrBuilder() { return getConfusionMatrix(); @@ -5775,6 +5820,7 @@ public Builder mergeFrom( * * @return The auPrc. */ + @java.lang.Override public float getAuPrc() { return auPrc_; } @@ -5829,6 +5875,7 @@ public Builder clearAuPrc() { * * @return The auRoc. */ + @java.lang.Override public float getAuRoc() { return auRoc_; } @@ -5882,6 +5929,7 @@ public Builder clearAuRoc() { * * @return The logLoss. */ + @java.lang.Override public float getLogLoss() { return logLoss_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationType.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationType.java index 2d5c5d3f2..c5b333b4d 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationType.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ClassificationType.java @@ -140,6 +140,10 @@ public ClassificationType findValueByNumber(int 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()); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateDatasetRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateDatasetRequest.java index 89349e163..178d57a68 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateDatasetRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateDatasetRequest.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -165,6 +166,7 @@ public java.lang.String getParent() { * * @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) { @@ -191,6 +193,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the dataset field is set. */ + @java.lang.Override public boolean hasDataset() { return dataset_ != null; } @@ -206,6 +209,7 @@ public boolean hasDataset() { * * @return The dataset. */ + @java.lang.Override public com.google.cloud.automl.v1.Dataset getDataset() { return dataset_ == null ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() : dataset_; } @@ -219,6 +223,7 @@ public com.google.cloud.automl.v1.Dataset getDataset() { * .google.cloud.automl.v1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder() { return getDataset(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequest.java index 027ced6a8..4a1db16db 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/CreateModelRequest.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -165,6 +166,7 @@ public java.lang.String getParent() { * * @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) { @@ -190,6 +192,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return Whether the model field is set. */ + @java.lang.Override public boolean hasModel() { return model_ != null; } @@ -204,6 +207,7 @@ public boolean hasModel() { * * @return The model. */ + @java.lang.Override public com.google.cloud.automl.v1.Model getModel() { return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; } @@ -216,6 +220,7 @@ public com.google.cloud.automl.v1.Model getModel() { * * .google.cloud.automl.v1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; */ + @java.lang.Override public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder() { return getModel(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Dataset.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Dataset.java index bc1b1c2ac..31c7e5ae8 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Dataset.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Dataset.java @@ -382,6 +382,7 @@ public DatasetMetadataCase getDatasetMetadataCase() { * * @return Whether the translationDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTranslationDatasetMetadata() { return datasetMetadataCase_ == 23; } @@ -397,6 +398,7 @@ public boolean hasTranslationDatasetMetadata() { * * @return The translationDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationDatasetMetadata getTranslationDatasetMetadata() { if (datasetMetadataCase_ == 23) { return (com.google.cloud.automl.v1.TranslationDatasetMetadata) datasetMetadata_; @@ -413,6 +415,7 @@ public com.google.cloud.automl.v1.TranslationDatasetMetadata getTranslationDatas * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; * */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder getTranslationDatasetMetadataOrBuilder() { if (datasetMetadataCase_ == 23) { @@ -435,6 +438,7 @@ public com.google.cloud.automl.v1.TranslationDatasetMetadata getTranslationDatas * * @return Whether the imageClassificationDatasetMetadata field is set. */ + @java.lang.Override public boolean hasImageClassificationDatasetMetadata() { return datasetMetadataCase_ == 24; } @@ -451,6 +455,7 @@ public boolean hasImageClassificationDatasetMetadata() { * * @return The imageClassificationDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationDatasetMetadata getImageClassificationDatasetMetadata() { if (datasetMetadataCase_ == 24) { @@ -469,6 +474,7 @@ public boolean hasImageClassificationDatasetMetadata() { * .google.cloud.automl.v1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationDatasetMetadataOrBuilder getImageClassificationDatasetMetadataOrBuilder() { if (datasetMetadataCase_ == 24) { @@ -491,6 +497,7 @@ public boolean hasImageClassificationDatasetMetadata() { * * @return Whether the textClassificationDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTextClassificationDatasetMetadata() { return datasetMetadataCase_ == 25; } @@ -507,6 +514,7 @@ public boolean hasTextClassificationDatasetMetadata() { * * @return The textClassificationDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationDatasetMetadata getTextClassificationDatasetMetadata() { if (datasetMetadataCase_ == 25) { @@ -525,6 +533,7 @@ public boolean hasTextClassificationDatasetMetadata() { * .google.cloud.automl.v1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationDatasetMetadataOrBuilder getTextClassificationDatasetMetadataOrBuilder() { if (datasetMetadataCase_ == 25) { @@ -547,6 +556,7 @@ public boolean hasTextClassificationDatasetMetadata() { * * @return Whether the imageObjectDetectionDatasetMetadata field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionDatasetMetadata() { return datasetMetadataCase_ == 26; } @@ -563,6 +573,7 @@ public boolean hasImageObjectDetectionDatasetMetadata() { * * @return The imageObjectDetectionDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata getImageObjectDetectionDatasetMetadata() { if (datasetMetadataCase_ == 26) { @@ -581,6 +592,7 @@ public boolean hasImageObjectDetectionDatasetMetadata() { * .google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadataOrBuilder getImageObjectDetectionDatasetMetadataOrBuilder() { if (datasetMetadataCase_ == 26) { @@ -603,6 +615,7 @@ public boolean hasImageObjectDetectionDatasetMetadata() { * * @return Whether the textExtractionDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTextExtractionDatasetMetadata() { return datasetMetadataCase_ == 28; } @@ -619,6 +632,7 @@ public boolean hasTextExtractionDatasetMetadata() { * * @return The textExtractionDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionDatasetMetadata getTextExtractionDatasetMetadata() { if (datasetMetadataCase_ == 28) { @@ -637,6 +651,7 @@ public boolean hasTextExtractionDatasetMetadata() { * .google.cloud.automl.v1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionDatasetMetadataOrBuilder getTextExtractionDatasetMetadataOrBuilder() { if (datasetMetadataCase_ == 28) { @@ -659,6 +674,7 @@ public boolean hasTextExtractionDatasetMetadata() { * * @return Whether the textSentimentDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTextSentimentDatasetMetadata() { return datasetMetadataCase_ == 30; } @@ -675,6 +691,7 @@ public boolean hasTextSentimentDatasetMetadata() { * * @return The textSentimentDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentDatasetMetadata getTextSentimentDatasetMetadata() { if (datasetMetadataCase_ == 30) { return (com.google.cloud.automl.v1.TextSentimentDatasetMetadata) datasetMetadata_; @@ -692,6 +709,7 @@ public com.google.cloud.automl.v1.TextSentimentDatasetMetadata getTextSentimentD * .google.cloud.automl.v1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentDatasetMetadataOrBuilder getTextSentimentDatasetMetadataOrBuilder() { if (datasetMetadataCase_ == 30) { @@ -714,6 +732,7 @@ public com.google.cloud.automl.v1.TextSentimentDatasetMetadata getTextSentimentD * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -737,6 +756,7 @@ public java.lang.String getName() { * * @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) { @@ -765,6 +785,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return The displayName. */ + @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { @@ -790,6 +811,7 @@ public java.lang.String getDisplayName() { * * @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) { @@ -816,6 +838,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * @return The description. */ + @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { @@ -839,6 +862,7 @@ public java.lang.String getDescription() { * * @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) { @@ -864,6 +888,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * @return The exampleCount. */ + @java.lang.Override public int getExampleCount() { return exampleCount_; } @@ -881,6 +906,7 @@ public int getExampleCount() { * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -895,6 +921,7 @@ public boolean hasCreateTime() { * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -907,6 +934,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * .google.protobuf.Timestamp create_time = 14; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -925,6 +953,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return The etag. */ + @java.lang.Override public java.lang.String getEtag() { java.lang.Object ref = etag_; if (ref instanceof java.lang.String) { @@ -948,6 +977,7 @@ public java.lang.String getEtag() { * * @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) { @@ -999,6 +1029,7 @@ public int getLabelsCount() { * * map<string, string> labels = 39; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1006,6 +1037,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1024,6 +1056,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 39; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1041,6 +1074,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 39; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1062,6 +1096,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 39; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1747,6 +1782,7 @@ public Builder clearDatasetMetadata() { * * @return Whether the translationDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTranslationDatasetMetadata() { return datasetMetadataCase_ == 23; } @@ -1762,6 +1798,7 @@ public boolean hasTranslationDatasetMetadata() { * * @return The translationDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationDatasetMetadata getTranslationDatasetMetadata() { if (translationDatasetMetadataBuilder_ == null) { if (datasetMetadataCase_ == 23) { @@ -1904,6 +1941,7 @@ public Builder clearTranslationDatasetMetadata() { * .google.cloud.automl.v1.TranslationDatasetMetadata translation_dataset_metadata = 23; * */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationDatasetMetadataOrBuilder getTranslationDatasetMetadataOrBuilder() { if ((datasetMetadataCase_ == 23) && (translationDatasetMetadataBuilder_ != null)) { @@ -1969,6 +2007,7 @@ public Builder clearTranslationDatasetMetadata() { * * @return Whether the imageClassificationDatasetMetadata field is set. */ + @java.lang.Override public boolean hasImageClassificationDatasetMetadata() { return datasetMetadataCase_ == 24; } @@ -1985,6 +2024,7 @@ public boolean hasImageClassificationDatasetMetadata() { * * @return The imageClassificationDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationDatasetMetadata getImageClassificationDatasetMetadata() { if (imageClassificationDatasetMetadataBuilder_ == null) { @@ -2136,6 +2176,7 @@ public Builder clearImageClassificationDatasetMetadata() { * .google.cloud.automl.v1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationDatasetMetadataOrBuilder getImageClassificationDatasetMetadataOrBuilder() { if ((datasetMetadataCase_ == 24) && (imageClassificationDatasetMetadataBuilder_ != null)) { @@ -2202,6 +2243,7 @@ public Builder clearImageClassificationDatasetMetadata() { * * @return Whether the textClassificationDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTextClassificationDatasetMetadata() { return datasetMetadataCase_ == 25; } @@ -2218,6 +2260,7 @@ public boolean hasTextClassificationDatasetMetadata() { * * @return The textClassificationDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationDatasetMetadata getTextClassificationDatasetMetadata() { if (textClassificationDatasetMetadataBuilder_ == null) { @@ -2369,6 +2412,7 @@ public Builder clearTextClassificationDatasetMetadata() { * .google.cloud.automl.v1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationDatasetMetadataOrBuilder getTextClassificationDatasetMetadataOrBuilder() { if ((datasetMetadataCase_ == 25) && (textClassificationDatasetMetadataBuilder_ != null)) { @@ -2435,6 +2479,7 @@ public Builder clearTextClassificationDatasetMetadata() { * * @return Whether the imageObjectDetectionDatasetMetadata field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionDatasetMetadata() { return datasetMetadataCase_ == 26; } @@ -2451,6 +2496,7 @@ public boolean hasImageObjectDetectionDatasetMetadata() { * * @return The imageObjectDetectionDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata getImageObjectDetectionDatasetMetadata() { if (imageObjectDetectionDatasetMetadataBuilder_ == null) { @@ -2602,6 +2648,7 @@ public Builder clearImageObjectDetectionDatasetMetadata() { * .google.cloud.automl.v1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionDatasetMetadataOrBuilder getImageObjectDetectionDatasetMetadataOrBuilder() { if ((datasetMetadataCase_ == 26) && (imageObjectDetectionDatasetMetadataBuilder_ != null)) { @@ -2668,6 +2715,7 @@ public Builder clearImageObjectDetectionDatasetMetadata() { * * @return Whether the textExtractionDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTextExtractionDatasetMetadata() { return datasetMetadataCase_ == 28; } @@ -2684,6 +2732,7 @@ public boolean hasTextExtractionDatasetMetadata() { * * @return The textExtractionDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionDatasetMetadata getTextExtractionDatasetMetadata() { if (textExtractionDatasetMetadataBuilder_ == null) { @@ -2833,6 +2882,7 @@ public Builder clearTextExtractionDatasetMetadata() { * .google.cloud.automl.v1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionDatasetMetadataOrBuilder getTextExtractionDatasetMetadataOrBuilder() { if ((datasetMetadataCase_ == 28) && (textExtractionDatasetMetadataBuilder_ != null)) { @@ -2899,6 +2949,7 @@ public Builder clearTextExtractionDatasetMetadata() { * * @return Whether the textSentimentDatasetMetadata field is set. */ + @java.lang.Override public boolean hasTextSentimentDatasetMetadata() { return datasetMetadataCase_ == 30; } @@ -2915,6 +2966,7 @@ public boolean hasTextSentimentDatasetMetadata() { * * @return The textSentimentDatasetMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentDatasetMetadata getTextSentimentDatasetMetadata() { if (textSentimentDatasetMetadataBuilder_ == null) { @@ -3064,6 +3116,7 @@ public Builder clearTextSentimentDatasetMetadata() { * .google.cloud.automl.v1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentDatasetMetadataOrBuilder getTextSentimentDatasetMetadataOrBuilder() { if ((datasetMetadataCase_ == 30) && (textSentimentDatasetMetadataBuilder_ != null)) { @@ -3467,6 +3520,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { * * @return The exampleCount. */ + @java.lang.Override public int getExampleCount() { return exampleCount_; } @@ -3839,6 +3893,7 @@ public int getLabelsCount() { * * map<string, string> labels = 39; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -3846,6 +3901,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -3864,6 +3920,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 39; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -3881,6 +3938,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 39; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -3903,6 +3961,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 39; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteDatasetRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteDatasetRequest.java index 8090947b8..54120ab1d 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteDatasetRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteDatasetRequest.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getName() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequest.java index 837e1a53a..65d629b1a 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeleteModelRequest.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getName() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeployModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeployModelRequest.java index fc2090284..df65afb8f 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeployModelRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DeployModelRequest.java @@ -220,6 +220,7 @@ public ModelDeploymentMetadataCase getModelDeploymentMetadataCase() { * * @return Whether the imageObjectDetectionModelDeploymentMetadata field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionModelDeploymentMetadata() { return modelDeploymentMetadataCase_ == 2; } @@ -236,6 +237,7 @@ public boolean hasImageObjectDetectionModelDeploymentMetadata() { * * @return The imageObjectDetectionModelDeploymentMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata getImageObjectDetectionModelDeploymentMetadata() { if (modelDeploymentMetadataCase_ == 2) { @@ -256,6 +258,7 @@ public boolean hasImageObjectDetectionModelDeploymentMetadata() { * .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataOrBuilder getImageObjectDetectionModelDeploymentMetadataOrBuilder() { if (modelDeploymentMetadataCase_ == 2) { @@ -280,6 +283,7 @@ public boolean hasImageObjectDetectionModelDeploymentMetadata() { * * @return Whether the imageClassificationModelDeploymentMetadata field is set. */ + @java.lang.Override public boolean hasImageClassificationModelDeploymentMetadata() { return modelDeploymentMetadataCase_ == 4; } @@ -296,6 +300,7 @@ public boolean hasImageClassificationModelDeploymentMetadata() { * * @return The imageClassificationModelDeploymentMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata getImageClassificationModelDeploymentMetadata() { if (modelDeploymentMetadataCase_ == 4) { @@ -316,6 +321,7 @@ public boolean hasImageClassificationModelDeploymentMetadata() { * .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataOrBuilder getImageClassificationModelDeploymentMetadataOrBuilder() { if (modelDeploymentMetadataCase_ == 4) { @@ -341,6 +347,7 @@ public boolean hasImageClassificationModelDeploymentMetadata() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -365,6 +372,7 @@ public java.lang.String getName() { * * @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) { @@ -814,6 +822,7 @@ public Builder clearModelDeploymentMetadata() { * * @return Whether the imageObjectDetectionModelDeploymentMetadata field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionModelDeploymentMetadata() { return modelDeploymentMetadataCase_ == 2; } @@ -830,6 +839,7 @@ public boolean hasImageObjectDetectionModelDeploymentMetadata() { * * @return The imageObjectDetectionModelDeploymentMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata getImageObjectDetectionModelDeploymentMetadata() { if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { @@ -985,6 +995,7 @@ public Builder clearImageObjectDetectionModelDeploymentMetadata() { * .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataOrBuilder getImageObjectDetectionModelDeploymentMetadataOrBuilder() { if ((modelDeploymentMetadataCase_ == 2) @@ -1056,6 +1067,7 @@ public Builder clearImageObjectDetectionModelDeploymentMetadata() { * * @return Whether the imageClassificationModelDeploymentMetadata field is set. */ + @java.lang.Override public boolean hasImageClassificationModelDeploymentMetadata() { return modelDeploymentMetadataCase_ == 4; } @@ -1072,6 +1084,7 @@ public boolean hasImageClassificationModelDeploymentMetadata() { * * @return The imageClassificationModelDeploymentMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata getImageClassificationModelDeploymentMetadata() { if (imageClassificationModelDeploymentMetadataBuilder_ == null) { @@ -1227,6 +1240,7 @@ public Builder clearImageClassificationModelDeploymentMetadata() { * .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataOrBuilder getImageClassificationModelDeploymentMetadataOrBuilder() { if ((modelDeploymentMetadataCase_ == 4) diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Document.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Document.java index 884ede829..e001d5b9f 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Document.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Document.java @@ -737,6 +737,10 @@ public TextSegmentType findValueByNumber(int 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()); } @@ -784,6 +788,7 @@ private TextSegmentType(int value) { * * @return Whether the textSegment field is set. */ + @java.lang.Override public boolean hasTextSegment() { return textSegment_ != null; } @@ -799,6 +804,7 @@ public boolean hasTextSegment() { * * @return The textSegment. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSegment getTextSegment() { return textSegment_ == null ? com.google.cloud.automl.v1.TextSegment.getDefaultInstance() @@ -814,6 +820,7 @@ public com.google.cloud.automl.v1.TextSegment getTextSegment() { * * .google.cloud.automl.v1.TextSegment text_segment = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSegmentOrBuilder getTextSegmentOrBuilder() { return getTextSegment(); } @@ -832,6 +839,7 @@ public com.google.cloud.automl.v1.TextSegmentOrBuilder getTextSegmentOrBuilder() * * @return The pageNumber. */ + @java.lang.Override public int getPageNumber() { return pageNumber_; } @@ -856,6 +864,7 @@ public int getPageNumber() { * * @return Whether the boundingPoly field is set. */ + @java.lang.Override public boolean hasBoundingPoly() { return boundingPoly_ != null; } @@ -877,6 +886,7 @@ public boolean hasBoundingPoly() { * * @return The boundingPoly. */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingPoly getBoundingPoly() { return boundingPoly_ == null ? com.google.cloud.automl.v1.BoundingPoly.getDefaultInstance() @@ -898,6 +908,7 @@ public com.google.cloud.automl.v1.BoundingPoly getBoundingPoly() { * * .google.cloud.automl.v1.BoundingPoly bounding_poly = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { return getBoundingPoly(); } @@ -915,6 +926,7 @@ public com.google.cloud.automl.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder * * @return The enum numeric value on the wire for textSegmentType. */ + @java.lang.Override public int getTextSegmentTypeValue() { return textSegmentType_; } @@ -929,6 +941,7 @@ public int getTextSegmentTypeValue() { * * @return The textSegmentType. */ + @java.lang.Override public com.google.cloud.automl.v1.Document.Layout.TextSegmentType getTextSegmentType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.Document.Layout.TextSegmentType result = @@ -1542,6 +1555,7 @@ public com.google.cloud.automl.v1.TextSegmentOrBuilder getTextSegmentOrBuilder() * * @return The pageNumber. */ + @java.lang.Override public int getPageNumber() { return pageNumber_; } @@ -1844,6 +1858,7 @@ public com.google.cloud.automl.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder * * @return The enum numeric value on the wire for textSegmentType. */ + @java.lang.Override public int getTextSegmentTypeValue() { return textSegmentType_; } @@ -1860,6 +1875,7 @@ public int getTextSegmentTypeValue() { * @return This builder for chaining. */ public Builder setTextSegmentTypeValue(int value) { + textSegmentType_ = value; onChanged(); return this; @@ -1875,6 +1891,7 @@ public Builder setTextSegmentTypeValue(int value) { * * @return The textSegmentType. */ + @java.lang.Override public com.google.cloud.automl.v1.Document.Layout.TextSegmentType getTextSegmentType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.Document.Layout.TextSegmentType result = @@ -1988,6 +2005,7 @@ public com.google.cloud.automl.v1.Document.Layout getDefaultInstanceForType() { * * @return Whether the inputConfig field is set. */ + @java.lang.Override public boolean hasInputConfig() { return inputConfig_ != null; } @@ -2002,6 +2020,7 @@ public boolean hasInputConfig() { * * @return The inputConfig. */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentInputConfig getInputConfig() { return inputConfig_ == null ? com.google.cloud.automl.v1.DocumentInputConfig.getDefaultInstance() @@ -2016,6 +2035,7 @@ public com.google.cloud.automl.v1.DocumentInputConfig getInputConfig() { * * .google.cloud.automl.v1.DocumentInputConfig input_config = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentInputConfigOrBuilder getInputConfigOrBuilder() { return getInputConfig(); } @@ -2033,6 +2053,7 @@ public com.google.cloud.automl.v1.DocumentInputConfigOrBuilder getInputConfigOrB * * @return Whether the documentText field is set. */ + @java.lang.Override public boolean hasDocumentText() { return documentText_ != null; } @@ -2047,6 +2068,7 @@ public boolean hasDocumentText() { * * @return The documentText. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippet getDocumentText() { return documentText_ == null ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance() @@ -2061,6 +2083,7 @@ public com.google.cloud.automl.v1.TextSnippet getDocumentText() { * * .google.cloud.automl.v1.TextSnippet document_text = 2; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippetOrBuilder getDocumentTextOrBuilder() { return getDocumentText(); } @@ -2077,6 +2100,7 @@ public com.google.cloud.automl.v1.TextSnippetOrBuilder getDocumentTextOrBuilder( * * repeated .google.cloud.automl.v1.Document.Layout layout = 3; */ + @java.lang.Override public java.util.List getLayoutList() { return layout_; } @@ -2090,6 +2114,7 @@ public java.util.List getLayoutList( * * repeated .google.cloud.automl.v1.Document.Layout layout = 3; */ + @java.lang.Override public java.util.List getLayoutOrBuilderList() { return layout_; @@ -2104,6 +2129,7 @@ public java.util.List getLayoutList( * * repeated .google.cloud.automl.v1.Document.Layout layout = 3; */ + @java.lang.Override public int getLayoutCount() { return layout_.size(); } @@ -2117,6 +2143,7 @@ public int getLayoutCount() { * * repeated .google.cloud.automl.v1.Document.Layout layout = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.Document.Layout getLayout(int index) { return layout_.get(index); } @@ -2130,6 +2157,7 @@ public com.google.cloud.automl.v1.Document.Layout getLayout(int index) { * * repeated .google.cloud.automl.v1.Document.Layout layout = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.Document.LayoutOrBuilder getLayoutOrBuilder(int index) { return layout_.get(index); } @@ -2147,6 +2175,7 @@ public com.google.cloud.automl.v1.Document.LayoutOrBuilder getLayoutOrBuilder(in * * @return Whether the documentDimensions field is set. */ + @java.lang.Override public boolean hasDocumentDimensions() { return documentDimensions_ != null; } @@ -2161,6 +2190,7 @@ public boolean hasDocumentDimensions() { * * @return The documentDimensions. */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentDimensions getDocumentDimensions() { return documentDimensions_ == null ? com.google.cloud.automl.v1.DocumentDimensions.getDefaultInstance() @@ -2175,6 +2205,7 @@ public com.google.cloud.automl.v1.DocumentDimensions getDocumentDimensions() { * * .google.cloud.automl.v1.DocumentDimensions document_dimensions = 4; */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentDimensionsOrBuilder getDocumentDimensionsOrBuilder() { return getDocumentDimensions(); } @@ -2192,6 +2223,7 @@ public com.google.cloud.automl.v1.DocumentDimensionsOrBuilder getDocumentDimensi * * @return The pageCount. */ + @java.lang.Override public int getPageCount() { return pageCount_; } @@ -3586,6 +3618,7 @@ public com.google.cloud.automl.v1.DocumentDimensionsOrBuilder getDocumentDimensi * * @return The pageCount. */ + @java.lang.Override public int getPageCount() { return pageCount_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentDimensions.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentDimensions.java index f55c22ee1..ce388f799 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentDimensions.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentDimensions.java @@ -266,6 +266,10 @@ public DocumentDimensionUnit findValueByNumber(int 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()); } @@ -312,6 +316,7 @@ private DocumentDimensionUnit(int value) { * * @return The enum numeric value on the wire for unit. */ + @java.lang.Override public int getUnitValue() { return unit_; } @@ -326,6 +331,7 @@ public int getUnitValue() { * * @return The unit. */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit getUnit() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit result = @@ -348,6 +354,7 @@ public com.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit getUn * * @return The width. */ + @java.lang.Override public float getWidth() { return width_; } @@ -365,6 +372,7 @@ public float getWidth() { * * @return The height. */ + @java.lang.Override public float getHeight() { return height_; } @@ -734,6 +742,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for unit. */ + @java.lang.Override public int getUnitValue() { return unit_; } @@ -750,6 +759,7 @@ public int getUnitValue() { * @return This builder for chaining. */ public Builder setUnitValue(int value) { + unit_ = value; onChanged(); return this; @@ -765,6 +775,7 @@ public Builder setUnitValue(int value) { * * @return The unit. */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit getUnit() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.DocumentDimensions.DocumentDimensionUnit result = @@ -825,6 +836,7 @@ public Builder clearUnit() { * * @return The width. */ + @java.lang.Override public float getWidth() { return width_; } @@ -876,6 +888,7 @@ public Builder clearWidth() { * * @return The height. */ + @java.lang.Override public float getHeight() { return height_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentInputConfig.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentInputConfig.java index a1d7e07a1..d43ed54da 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentInputConfig.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/DocumentInputConfig.java @@ -134,6 +134,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the gcsSource field is set. */ + @java.lang.Override public boolean hasGcsSource() { return gcsSource_ != null; } @@ -151,6 +152,7 @@ public boolean hasGcsSource() { * * @return The gcsSource. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSource getGcsSource() { return gcsSource_ == null ? com.google.cloud.automl.v1.GcsSource.getDefaultInstance() @@ -168,6 +170,7 @@ public com.google.cloud.automl.v1.GcsSource getGcsSource() { * * .google.cloud.automl.v1.GcsSource gcs_source = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { return getGcsSource(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayload.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayload.java index e2a24536f..eff0e1ca2 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayload.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExamplePayload.java @@ -211,6 +211,7 @@ public PayloadCase getPayloadCase() { * * @return Whether the image field is set. */ + @java.lang.Override public boolean hasImage() { return payloadCase_ == 1; } @@ -225,6 +226,7 @@ public boolean hasImage() { * * @return The image. */ + @java.lang.Override public com.google.cloud.automl.v1.Image getImage() { if (payloadCase_ == 1) { return (com.google.cloud.automl.v1.Image) payload_; @@ -240,6 +242,7 @@ public com.google.cloud.automl.v1.Image getImage() { * * .google.cloud.automl.v1.Image image = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.ImageOrBuilder getImageOrBuilder() { if (payloadCase_ == 1) { return (com.google.cloud.automl.v1.Image) payload_; @@ -259,6 +262,7 @@ public com.google.cloud.automl.v1.ImageOrBuilder getImageOrBuilder() { * * @return Whether the textSnippet field is set. */ + @java.lang.Override public boolean hasTextSnippet() { return payloadCase_ == 2; } @@ -273,6 +277,7 @@ public boolean hasTextSnippet() { * * @return The textSnippet. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippet getTextSnippet() { if (payloadCase_ == 2) { return (com.google.cloud.automl.v1.TextSnippet) payload_; @@ -288,6 +293,7 @@ public com.google.cloud.automl.v1.TextSnippet getTextSnippet() { * * .google.cloud.automl.v1.TextSnippet text_snippet = 2; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippetOrBuilder getTextSnippetOrBuilder() { if (payloadCase_ == 2) { return (com.google.cloud.automl.v1.TextSnippet) payload_; @@ -307,6 +313,7 @@ public com.google.cloud.automl.v1.TextSnippetOrBuilder getTextSnippetOrBuilder() * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return payloadCase_ == 4; } @@ -321,6 +328,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.cloud.automl.v1.Document getDocument() { if (payloadCase_ == 4) { return (com.google.cloud.automl.v1.Document) payload_; @@ -336,6 +344,7 @@ public com.google.cloud.automl.v1.Document getDocument() { * * .google.cloud.automl.v1.Document document = 4; */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentOrBuilder getDocumentOrBuilder() { if (payloadCase_ == 4) { return (com.google.cloud.automl.v1.Document) payload_; @@ -772,6 +781,7 @@ public Builder clearPayload() { * * @return Whether the image field is set. */ + @java.lang.Override public boolean hasImage() { return payloadCase_ == 1; } @@ -786,6 +796,7 @@ public boolean hasImage() { * * @return The image. */ + @java.lang.Override public com.google.cloud.automl.v1.Image getImage() { if (imageBuilder_ == null) { if (payloadCase_ == 1) { @@ -917,6 +928,7 @@ public com.google.cloud.automl.v1.Image.Builder getImageBuilder() { * * .google.cloud.automl.v1.Image image = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.ImageOrBuilder getImageOrBuilder() { if ((payloadCase_ == 1) && (imageBuilder_ != null)) { return imageBuilder_.getMessageOrBuilder(); @@ -975,6 +987,7 @@ public com.google.cloud.automl.v1.ImageOrBuilder getImageOrBuilder() { * * @return Whether the textSnippet field is set. */ + @java.lang.Override public boolean hasTextSnippet() { return payloadCase_ == 2; } @@ -989,6 +1002,7 @@ public boolean hasTextSnippet() { * * @return The textSnippet. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippet getTextSnippet() { if (textSnippetBuilder_ == null) { if (payloadCase_ == 2) { @@ -1120,6 +1134,7 @@ public com.google.cloud.automl.v1.TextSnippet.Builder getTextSnippetBuilder() { * * .google.cloud.automl.v1.TextSnippet text_snippet = 2; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippetOrBuilder getTextSnippetOrBuilder() { if ((payloadCase_ == 2) && (textSnippetBuilder_ != null)) { return textSnippetBuilder_.getMessageOrBuilder(); @@ -1180,6 +1195,7 @@ public com.google.cloud.automl.v1.TextSnippetOrBuilder getTextSnippetOrBuilder() * * @return Whether the document field is set. */ + @java.lang.Override public boolean hasDocument() { return payloadCase_ == 4; } @@ -1194,6 +1210,7 @@ public boolean hasDocument() { * * @return The document. */ + @java.lang.Override public com.google.cloud.automl.v1.Document getDocument() { if (documentBuilder_ == null) { if (payloadCase_ == 4) { @@ -1325,6 +1342,7 @@ public com.google.cloud.automl.v1.Document.Builder getDocumentBuilder() { * * .google.cloud.automl.v1.Document document = 4; */ + @java.lang.Override public com.google.cloud.automl.v1.DocumentOrBuilder getDocumentOrBuilder() { if ((payloadCase_ == 4) && (documentBuilder_ != null)) { return documentBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataOperationMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataOperationMetadata.java index 4e6326ca0..9f3463c4b 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataOperationMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataOperationMetadata.java @@ -749,6 +749,7 @@ public Builder clearOutputLocation() { * * @return The gcsOutputDirectory. */ + @java.lang.Override public java.lang.String getGcsOutputDirectory() { java.lang.Object ref = ""; if (outputLocationCase_ == 1) { @@ -777,6 +778,7 @@ public java.lang.String getGcsOutputDirectory() { * * @return The bytes for gcsOutputDirectory. */ + @java.lang.Override public com.google.protobuf.ByteString getGcsOutputDirectoryBytes() { java.lang.Object ref = ""; if (outputLocationCase_ == 1) { @@ -929,6 +931,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return Whether the outputInfo field is set. */ + @java.lang.Override public boolean hasOutputInfo() { return outputInfo_ != null; } @@ -944,6 +947,7 @@ public boolean hasOutputInfo() { * * @return The outputInfo. */ + @java.lang.Override public com.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo getOutputInfo() { return outputInfo_ == null @@ -961,6 +965,7 @@ public boolean hasOutputInfo() { * .google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; * */ + @java.lang.Override public com.google.cloud.automl.v1.ExportDataOperationMetadata.ExportDataOutputInfoOrBuilder getOutputInfoOrBuilder() { return getOutputInfo(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequest.java index f3fce5c97..2229bd283 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportDataRequest.java @@ -142,6 +142,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -166,6 +167,7 @@ public java.lang.String getName() { * * @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) { @@ -193,6 +195,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the outputConfig field is set. */ + @java.lang.Override public boolean hasOutputConfig() { return outputConfig_ != null; } @@ -209,6 +212,7 @@ public boolean hasOutputConfig() { * * @return The outputConfig. */ + @java.lang.Override public com.google.cloud.automl.v1.OutputConfig getOutputConfig() { return outputConfig_ == null ? com.google.cloud.automl.v1.OutputConfig.getDefaultInstance() @@ -225,6 +229,7 @@ public com.google.cloud.automl.v1.OutputConfig getOutputConfig() { * .google.cloud.automl.v1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { return getOutputConfig(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelOperationMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelOperationMetadata.java index 99c39cd31..eaa170ca1 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelOperationMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelOperationMetadata.java @@ -263,6 +263,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The gcsOutputDirectory. */ + @java.lang.Override public java.lang.String getGcsOutputDirectory() { java.lang.Object ref = gcsOutputDirectory_; if (ref instanceof java.lang.String) { @@ -286,6 +287,7 @@ public java.lang.String getGcsOutputDirectory() { * * @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) { @@ -830,6 +832,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return Whether the outputInfo field is set. */ + @java.lang.Override public boolean hasOutputInfo() { return outputInfo_ != null; } @@ -847,6 +850,7 @@ public boolean hasOutputInfo() { * * @return The outputInfo. */ + @java.lang.Override public com.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo getOutputInfo() { return outputInfo_ == null @@ -866,6 +870,7 @@ public boolean hasOutputInfo() { * .google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.ExportModelOperationMetadata.ExportModelOutputInfoOrBuilder getOutputInfoOrBuilder() { return getOutputInfo(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelRequest.java index 03fe5b261..472e6c999 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ExportModelRequest.java @@ -145,6 +145,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -169,6 +170,7 @@ public java.lang.String getName() { * * @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) { @@ -196,6 +198,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the outputConfig field is set. */ + @java.lang.Override public boolean hasOutputConfig() { return outputConfig_ != null; } @@ -212,6 +215,7 @@ public boolean hasOutputConfig() { * * @return The outputConfig. */ + @java.lang.Override public com.google.cloud.automl.v1.ModelExportOutputConfig getOutputConfig() { return outputConfig_ == null ? com.google.cloud.automl.v1.ModelExportOutputConfig.getDefaultInstance() @@ -228,6 +232,7 @@ public com.google.cloud.automl.v1.ModelExportOutputConfig getOutputConfig() { * .google.cloud.automl.v1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.ModelExportOutputConfigOrBuilder getOutputConfigOrBuilder() { return getOutputConfig(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestination.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestination.java index 039ae0abb..4e5efb54d 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestination.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GcsDestination.java @@ -129,6 +129,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The outputUriPrefix. */ + @java.lang.Override public java.lang.String getOutputUriPrefix() { java.lang.Object ref = outputUriPrefix_; if (ref instanceof java.lang.String) { @@ -156,6 +157,7 @@ public java.lang.String getOutputUriPrefix() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetAnnotationSpecRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetAnnotationSpecRequest.java index 1d4211c56..bdcc9a6d0 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetAnnotationSpecRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetAnnotationSpecRequest.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getName() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequest.java index 3c29108fe..7089cff35 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetDatasetRequest.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getName() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequest.java index 9882f7cdd..99ff26a47 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelEvaluationRequest.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getName() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequest.java index 1176aef44..00d5fea15 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/GetModelRequest.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getName() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Image.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Image.java index 1ef517943..6d2df04b0 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Image.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Image.java @@ -175,6 +175,7 @@ public DataCase getDataCase() { * * @return The imageBytes. */ + @java.lang.Override public com.google.protobuf.ByteString getImageBytes() { if (dataCase_ == 1) { return (com.google.protobuf.ByteString) data_; @@ -195,6 +196,7 @@ public com.google.protobuf.ByteString getImageBytes() { * * @return The thumbnailUri. */ + @java.lang.Override public java.lang.String getThumbnailUri() { java.lang.Object ref = thumbnailUri_; if (ref instanceof java.lang.String) { @@ -217,6 +219,7 @@ public java.lang.String getThumbnailUri() { * * @return The bytes for thumbnailUri. */ + @java.lang.Override public com.google.protobuf.ByteString getThumbnailUriBytes() { java.lang.Object ref = thumbnailUri_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationDatasetMetadata.java index 6df9994f2..33aa1a777 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationDatasetMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationDatasetMetadata.java @@ -125,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The enum numeric value on the wire for classificationType. */ + @java.lang.Override public int getClassificationTypeValue() { return classificationType_; } @@ -139,6 +140,7 @@ public int getClassificationTypeValue() { * * @return The classificationType. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationType getClassificationType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.ClassificationType result = @@ -483,6 +485,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for classificationType. */ + @java.lang.Override public int getClassificationTypeValue() { return classificationType_; } @@ -499,6 +502,7 @@ public int getClassificationTypeValue() { * @return This builder for chaining. */ public Builder setClassificationTypeValue(int value) { + classificationType_ = value; onChanged(); return this; @@ -514,6 +518,7 @@ public Builder setClassificationTypeValue(int value) { * * @return The classificationType. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationType getClassificationType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.ClassificationType result = diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelDeploymentMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelDeploymentMetadata.java index 40d5843f5..8663c6790 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelDeploymentMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelDeploymentMetadata.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } @@ -472,6 +473,7 @@ public Builder mergeFrom( * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelMetadata.java index 2a8a2f804..3ffe369eb 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageClassificationModelMetadata.java @@ -165,6 +165,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The baseModelId. */ + @java.lang.Override public java.lang.String getBaseModelId() { java.lang.Object ref = baseModelId_; if (ref instanceof java.lang.String) { @@ -191,6 +192,7 @@ public java.lang.String getBaseModelId() { * * @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) { @@ -229,6 +231,7 @@ public com.google.protobuf.ByteString getBaseModelIdBytes() { * * @return The trainBudgetMilliNodeHours. */ + @java.lang.Override public long getTrainBudgetMilliNodeHours() { return trainBudgetMilliNodeHours_; } @@ -248,6 +251,7 @@ public long getTrainBudgetMilliNodeHours() { * * @return The trainCostMilliNodeHours. */ + @java.lang.Override public long getTrainCostMilliNodeHours() { return trainCostMilliNodeHours_; } @@ -266,6 +270,7 @@ public long getTrainCostMilliNodeHours() { * * @return The stopReason. */ + @java.lang.Override public java.lang.String getStopReason() { java.lang.Object ref = stopReason_; if (ref instanceof java.lang.String) { @@ -289,6 +294,7 @@ public java.lang.String getStopReason() { * * @return The bytes for stopReason. */ + @java.lang.Override public com.google.protobuf.ByteString getStopReasonBytes() { java.lang.Object ref = stopReason_; if (ref instanceof java.lang.String) { @@ -346,6 +352,7 @@ public com.google.protobuf.ByteString getStopReasonBytes() { * * @return The modelType. */ + @java.lang.Override public java.lang.String getModelType() { java.lang.Object ref = modelType_; if (ref instanceof java.lang.String) { @@ -400,6 +407,7 @@ public java.lang.String getModelType() { * * @return The bytes for modelType. */ + @java.lang.Override public com.google.protobuf.ByteString getModelTypeBytes() { java.lang.Object ref = modelType_; if (ref instanceof java.lang.String) { @@ -426,6 +434,7 @@ public com.google.protobuf.ByteString getModelTypeBytes() { * * @return The nodeQps. */ + @java.lang.Override public double getNodeQps() { return nodeQps_; } @@ -445,6 +454,7 @@ public double getNodeQps() { * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } @@ -1016,6 +1026,7 @@ public Builder setBaseModelIdBytes(com.google.protobuf.ByteString value) { * * @return The trainBudgetMilliNodeHours. */ + @java.lang.Override public long getTrainBudgetMilliNodeHours() { return trainBudgetMilliNodeHours_; } @@ -1095,6 +1106,7 @@ public Builder clearTrainBudgetMilliNodeHours() { * * @return The trainCostMilliNodeHours. */ + @java.lang.Override public long getTrainCostMilliNodeHours() { return trainCostMilliNodeHours_; } @@ -1528,6 +1540,7 @@ public Builder setModelTypeBytes(com.google.protobuf.ByteString value) { * * @return The nodeQps. */ + @java.lang.Override public double getNodeQps() { return nodeQps_; } @@ -1583,6 +1596,7 @@ public Builder clearNodeQps() { * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionAnnotation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionAnnotation.java index 6fd3c8a17..459327f5d 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionAnnotation.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionAnnotation.java @@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the boundingBox field is set. */ + @java.lang.Override public boolean hasBoundingBox() { return boundingBox_ != null; } @@ -151,6 +152,7 @@ public boolean hasBoundingBox() { * * @return The boundingBox. */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingPoly getBoundingBox() { return boundingBox_ == null ? com.google.cloud.automl.v1.BoundingPoly.getDefaultInstance() @@ -165,6 +167,7 @@ public com.google.cloud.automl.v1.BoundingPoly getBoundingBox() { * * .google.cloud.automl.v1.BoundingPoly bounding_box = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { return getBoundingBox(); } @@ -183,6 +186,7 @@ public com.google.cloud.automl.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder( * * @return The score. */ + @java.lang.Override public float getScore() { return score_; } @@ -732,6 +736,7 @@ public com.google.cloud.automl.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder( * * @return The score. */ + @java.lang.Override public float getScore() { return score_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionEvaluationMetrics.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionEvaluationMetrics.java index d83d4e657..b65f5e6a7 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionEvaluationMetrics.java @@ -149,6 +149,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The evaluatedBoundingBoxCount. */ + @java.lang.Override public int getEvaluatedBoundingBoxCount() { return evaluatedBoundingBoxCount_; } @@ -170,6 +171,7 @@ public int getEvaluatedBoundingBoxCount() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; * */ + @java.lang.Override public java.util.List getBoundingBoxMetricsEntriesList() { return boundingBoxMetricsEntries_; @@ -188,6 +190,7 @@ public int getEvaluatedBoundingBoxCount() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; * */ + @java.lang.Override public java.util.List getBoundingBoxMetricsEntriesOrBuilderList() { return boundingBoxMetricsEntries_; @@ -206,6 +209,7 @@ public int getEvaluatedBoundingBoxCount() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; * */ + @java.lang.Override public int getBoundingBoxMetricsEntriesCount() { return boundingBoxMetricsEntries_.size(); } @@ -223,6 +227,7 @@ public int getBoundingBoxMetricsEntriesCount() { * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingBoxMetricsEntry getBoundingBoxMetricsEntries( int index) { return boundingBoxMetricsEntries_.get(index); @@ -241,6 +246,7 @@ public com.google.cloud.automl.v1.BoundingBoxMetricsEntry getBoundingBoxMetricsE * repeated .google.cloud.automl.v1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.BoundingBoxMetricsEntryOrBuilder getBoundingBoxMetricsEntriesOrBuilder(int index) { return boundingBoxMetricsEntries_.get(index); @@ -260,6 +266,7 @@ public com.google.cloud.automl.v1.BoundingBoxMetricsEntry getBoundingBoxMetricsE * * @return The boundingBoxMeanAveragePrecision. */ + @java.lang.Override public float getBoundingBoxMeanAveragePrecision() { return boundingBoxMeanAveragePrecision_; } @@ -680,6 +687,7 @@ public Builder mergeFrom( * * @return The evaluatedBoundingBoxCount. */ + @java.lang.Override public int getEvaluatedBoundingBoxCount() { return evaluatedBoundingBoxCount_; } @@ -1189,6 +1197,7 @@ public Builder removeBoundingBoxMetricsEntries(int index) { * * @return The boundingBoxMeanAveragePrecision. */ + @java.lang.Override public float getBoundingBoxMeanAveragePrecision() { return boundingBoxMeanAveragePrecision_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelDeploymentMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelDeploymentMetadata.java index 1951f4573..23bb23349 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelDeploymentMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelDeploymentMetadata.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } @@ -473,6 +474,7 @@ public Builder mergeFrom( * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelMetadata.java index e0bbd9b70..4c09382a0 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImageObjectDetectionModelMetadata.java @@ -175,6 +175,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The modelType. */ + @java.lang.Override public java.lang.String getModelType() { java.lang.Object ref = modelType_; if (ref instanceof java.lang.String) { @@ -219,6 +220,7 @@ public java.lang.String getModelType() { * * @return The bytes for modelType. */ + @java.lang.Override public com.google.protobuf.ByteString getModelTypeBytes() { java.lang.Object ref = modelType_; if (ref instanceof java.lang.String) { @@ -246,6 +248,7 @@ public com.google.protobuf.ByteString getModelTypeBytes() { * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } @@ -264,6 +267,7 @@ public long getNodeCount() { * * @return The nodeQps. */ + @java.lang.Override public double getNodeQps() { return nodeQps_; } @@ -282,6 +286,7 @@ public double getNodeQps() { * * @return The stopReason. */ + @java.lang.Override public java.lang.String getStopReason() { java.lang.Object ref = stopReason_; if (ref instanceof java.lang.String) { @@ -305,6 +310,7 @@ public java.lang.String getStopReason() { * * @return The bytes for stopReason. */ + @java.lang.Override public com.google.protobuf.ByteString getStopReasonBytes() { java.lang.Object ref = stopReason_; if (ref instanceof java.lang.String) { @@ -344,6 +350,7 @@ public com.google.protobuf.ByteString getStopReasonBytes() { * * @return The trainBudgetMilliNodeHours. */ + @java.lang.Override public long getTrainBudgetMilliNodeHours() { return trainBudgetMilliNodeHours_; } @@ -363,6 +370,7 @@ public long getTrainBudgetMilliNodeHours() { * * @return The trainCostMilliNodeHours. */ + @java.lang.Override public long getTrainCostMilliNodeHours() { return trainCostMilliNodeHours_; } @@ -998,6 +1006,7 @@ public Builder setModelTypeBytes(com.google.protobuf.ByteString value) { * * @return The nodeCount. */ + @java.lang.Override public long getNodeCount() { return nodeCount_; } @@ -1054,6 +1063,7 @@ public Builder clearNodeCount() { * * @return The nodeQps. */ + @java.lang.Override public double getNodeQps() { return nodeQps_; } @@ -1232,6 +1242,7 @@ public Builder setStopReasonBytes(com.google.protobuf.ByteString value) { * * @return The trainBudgetMilliNodeHours. */ + @java.lang.Override public long getTrainBudgetMilliNodeHours() { return trainBudgetMilliNodeHours_; } @@ -1313,6 +1324,7 @@ public Builder clearTrainBudgetMilliNodeHours() { * * @return The trainCostMilliNodeHours. */ + @java.lang.Override public long getTrainCostMilliNodeHours() { return trainCostMilliNodeHours_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequest.java index 4f126c349..ecad8d9c4 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ImportDataRequest.java @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -168,6 +169,7 @@ public java.lang.String getName() { * * @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) { @@ -196,6 +198,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the inputConfig field is set. */ + @java.lang.Override public boolean hasInputConfig() { return inputConfig_ != null; } @@ -213,6 +216,7 @@ public boolean hasInputConfig() { * * @return The inputConfig. */ + @java.lang.Override public com.google.cloud.automl.v1.InputConfig getInputConfig() { return inputConfig_ == null ? com.google.cloud.automl.v1.InputConfig.getDefaultInstance() @@ -230,6 +234,7 @@ public com.google.cloud.automl.v1.InputConfig getInputConfig() { * .google.cloud.automl.v1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.InputConfigOrBuilder getInputConfigOrBuilder() { return getInputConfig(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfig.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfig.java index cbbf7bc58..062c26564 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfig.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/InputConfig.java @@ -671,6 +671,7 @@ public SourceCase getSourceCase() { * * @return Whether the gcsSource field is set. */ + @java.lang.Override public boolean hasGcsSource() { return sourceCase_ == 1; } @@ -687,6 +688,7 @@ public boolean hasGcsSource() { * * @return The gcsSource. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSource getGcsSource() { if (sourceCase_ == 1) { return (com.google.cloud.automl.v1.GcsSource) source_; @@ -704,6 +706,7 @@ public com.google.cloud.automl.v1.GcsSource getGcsSource() { * * .google.cloud.automl.v1.GcsSource gcs_source = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { if (sourceCase_ == 1) { return (com.google.cloud.automl.v1.GcsSource) source_; @@ -753,6 +756,7 @@ public int getParamsCount() { * * map<string, string> params = 2; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -760,6 +764,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -781,6 +786,7 @@ public java.util.Map getParams() { * * map<string, string> params = 2; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -801,6 +807,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -825,6 +832,7 @@ public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1726,6 +1734,7 @@ public Builder clearSource() { * * @return Whether the gcsSource field is set. */ + @java.lang.Override public boolean hasGcsSource() { return sourceCase_ == 1; } @@ -1742,6 +1751,7 @@ public boolean hasGcsSource() { * * @return The gcsSource. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSource getGcsSource() { if (gcsSourceBuilder_ == null) { if (sourceCase_ == 1) { @@ -1885,6 +1895,7 @@ public com.google.cloud.automl.v1.GcsSource.Builder getGcsSourceBuilder() { * * .google.cloud.automl.v1.GcsSource gcs_source = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { return gcsSourceBuilder_.getMessageOrBuilder(); @@ -1971,6 +1982,7 @@ public int getParamsCount() { * * map<string, string> params = 2; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1978,6 +1990,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -1999,6 +2012,7 @@ public java.util.Map getParams() { * * map<string, string> params = 2; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -2019,6 +2033,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -2044,6 +2059,7 @@ public java.lang.String getParamsOrDefault( * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsRequest.java index b51d97e97..65993c333 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsRequest.java @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -171,6 +172,7 @@ public java.lang.String getParent() { * * @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) { @@ -200,6 +202,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -226,6 +229,7 @@ public java.lang.String getFilter() { * * @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) { @@ -252,6 +256,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -272,6 +277,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -297,6 +303,7 @@ public java.lang.String getPageToken() { * * @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) { @@ -927,6 +934,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponse.java index a25b3f017..edfb7c195 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponse.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListDatasetsResponse.java @@ -138,6 +138,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.cloud.automl.v1.Dataset datasets = 1; */ + @java.lang.Override public java.util.List getDatasetsList() { return datasets_; } @@ -150,6 +151,7 @@ public java.util.List getDatasetsList() { * * repeated .google.cloud.automl.v1.Dataset datasets = 1; */ + @java.lang.Override public java.util.List getDatasetsOrBuilderList() { return datasets_; @@ -163,6 +165,7 @@ public java.util.List getDatasetsList() { * * repeated .google.cloud.automl.v1.Dataset datasets = 1; */ + @java.lang.Override public int getDatasetsCount() { return datasets_.size(); } @@ -175,6 +178,7 @@ public int getDatasetsCount() { * * repeated .google.cloud.automl.v1.Dataset datasets = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.Dataset getDatasets(int index) { return datasets_.get(index); } @@ -187,6 +191,7 @@ public com.google.cloud.automl.v1.Dataset getDatasets(int index) { * * repeated .google.cloud.automl.v1.Dataset datasets = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetsOrBuilder(int index) { return datasets_.get(index); } @@ -205,6 +210,7 @@ public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetsOrBuilder(int inde * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -228,6 +234,7 @@ public java.lang.String getNextPageToken() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequest.java index 29743327c..3be777c1f 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsRequest.java @@ -149,6 +149,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -175,6 +176,7 @@ public java.lang.String getParent() { * * @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) { @@ -207,6 +209,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -236,6 +239,7 @@ public java.lang.String getFilter() { * * @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) { @@ -261,6 +265,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -281,6 +286,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -306,6 +312,7 @@ public java.lang.String getPageToken() { * * @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) { @@ -963,6 +970,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponse.java index cc56a45b9..d47ec5fe7 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponse.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelEvaluationsResponse.java @@ -139,6 +139,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; */ + @java.lang.Override public java.util.List getModelEvaluationList() { return modelEvaluation_; } @@ -151,6 +152,7 @@ public java.util.List getModelEvalua * * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; */ + @java.lang.Override public java.util.List getModelEvaluationOrBuilderList() { return modelEvaluation_; @@ -164,6 +166,7 @@ public java.util.List getModelEvalua * * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; */ + @java.lang.Override public int getModelEvaluationCount() { return modelEvaluation_.size(); } @@ -176,6 +179,7 @@ public int getModelEvaluationCount() { * * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.ModelEvaluation getModelEvaluation(int index) { return modelEvaluation_.get(index); } @@ -188,6 +192,7 @@ public com.google.cloud.automl.v1.ModelEvaluation getModelEvaluation(int index) * * repeated .google.cloud.automl.v1.ModelEvaluation model_evaluation = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.ModelEvaluationOrBuilder getModelEvaluationOrBuilder( int index) { return modelEvaluation_.get(index); @@ -208,6 +213,7 @@ public com.google.cloud.automl.v1.ModelEvaluationOrBuilder getModelEvaluationOrB * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -232,6 +238,7 @@ public java.lang.String getNextPageToken() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequest.java index a3de7a1d6..a0e6bb60a 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsRequest.java @@ -147,6 +147,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The parent. */ + @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { @@ -171,6 +172,7 @@ public java.lang.String getParent() { * * @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) { @@ -202,6 +204,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * @return The filter. */ + @java.lang.Override public java.lang.String getFilter() { java.lang.Object ref = filter_; if (ref instanceof java.lang.String) { @@ -230,6 +233,7 @@ public java.lang.String getFilter() { * * @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) { @@ -255,6 +259,7 @@ public com.google.protobuf.ByteString getFilterBytes() { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } @@ -275,6 +280,7 @@ public int getPageSize() { * * @return The pageToken. */ + @java.lang.Override public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -300,6 +306,7 @@ public java.lang.String getPageToken() { * * @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) { @@ -939,6 +946,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { * * @return The pageSize. */ + @java.lang.Override public int getPageSize() { return pageSize_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponse.java index 5def859a2..c510fcaf9 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponse.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ListModelsResponse.java @@ -137,6 +137,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * repeated .google.cloud.automl.v1.Model model = 1; */ + @java.lang.Override public java.util.List getModelList() { return model_; } @@ -149,6 +150,7 @@ public java.util.List getModelList() { * * repeated .google.cloud.automl.v1.Model model = 1; */ + @java.lang.Override public java.util.List getModelOrBuilderList() { return model_; @@ -162,6 +164,7 @@ public java.util.List getModelList() { * * repeated .google.cloud.automl.v1.Model model = 1; */ + @java.lang.Override public int getModelCount() { return model_.size(); } @@ -174,6 +177,7 @@ public int getModelCount() { * * repeated .google.cloud.automl.v1.Model model = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.Model getModel(int index) { return model_.get(index); } @@ -186,6 +190,7 @@ public com.google.cloud.automl.v1.Model getModel(int index) { * * repeated .google.cloud.automl.v1.Model model = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder(int index) { return model_.get(index); } @@ -204,6 +209,7 @@ public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder(int index) { * * @return The nextPageToken. */ + @java.lang.Override public java.lang.String getNextPageToken() { java.lang.Object ref = nextPageToken_; if (ref instanceof java.lang.String) { @@ -227,6 +233,7 @@ public java.lang.String getNextPageToken() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Model.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Model.java index 5c8cca0cd..275c80f10 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Model.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/Model.java @@ -440,6 +440,10 @@ public DeploymentState findValueByNumber(int 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()); } @@ -544,6 +548,7 @@ public ModelMetadataCase getModelMetadataCase() { * * @return Whether the translationModelMetadata field is set. */ + @java.lang.Override public boolean hasTranslationModelMetadata() { return modelMetadataCase_ == 15; } @@ -558,6 +563,7 @@ public boolean hasTranslationModelMetadata() { * * @return The translationModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationModelMetadata getTranslationModelMetadata() { if (modelMetadataCase_ == 15) { return (com.google.cloud.automl.v1.TranslationModelMetadata) modelMetadata_; @@ -573,6 +579,7 @@ public com.google.cloud.automl.v1.TranslationModelMetadata getTranslationModelMe * * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder getTranslationModelMetadataOrBuilder() { if (modelMetadataCase_ == 15) { @@ -595,6 +602,7 @@ public com.google.cloud.automl.v1.TranslationModelMetadata getTranslationModelMe * * @return Whether the imageClassificationModelMetadata field is set. */ + @java.lang.Override public boolean hasImageClassificationModelMetadata() { return modelMetadataCase_ == 13; } @@ -611,6 +619,7 @@ public boolean hasImageClassificationModelMetadata() { * * @return The imageClassificationModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelMetadata getImageClassificationModelMetadata() { if (modelMetadataCase_ == 13) { @@ -629,6 +638,7 @@ public boolean hasImageClassificationModelMetadata() { * .google.cloud.automl.v1.ImageClassificationModelMetadata image_classification_model_metadata = 13; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelMetadataOrBuilder getImageClassificationModelMetadataOrBuilder() { if (modelMetadataCase_ == 13) { @@ -651,6 +661,7 @@ public boolean hasImageClassificationModelMetadata() { * * @return Whether the textClassificationModelMetadata field is set. */ + @java.lang.Override public boolean hasTextClassificationModelMetadata() { return modelMetadataCase_ == 14; } @@ -667,6 +678,7 @@ public boolean hasTextClassificationModelMetadata() { * * @return The textClassificationModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationModelMetadata getTextClassificationModelMetadata() { if (modelMetadataCase_ == 14) { @@ -685,6 +697,7 @@ public boolean hasTextClassificationModelMetadata() { * .google.cloud.automl.v1.TextClassificationModelMetadata text_classification_model_metadata = 14; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationModelMetadataOrBuilder getTextClassificationModelMetadataOrBuilder() { if (modelMetadataCase_ == 14) { @@ -707,6 +720,7 @@ public boolean hasTextClassificationModelMetadata() { * * @return Whether the imageObjectDetectionModelMetadata field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionModelMetadata() { return modelMetadataCase_ == 20; } @@ -723,6 +737,7 @@ public boolean hasImageObjectDetectionModelMetadata() { * * @return The imageObjectDetectionModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelMetadata getImageObjectDetectionModelMetadata() { if (modelMetadataCase_ == 20) { @@ -741,6 +756,7 @@ public boolean hasImageObjectDetectionModelMetadata() { * .google.cloud.automl.v1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelMetadataOrBuilder getImageObjectDetectionModelMetadataOrBuilder() { if (modelMetadataCase_ == 20) { @@ -762,6 +778,7 @@ public boolean hasImageObjectDetectionModelMetadata() { * * @return Whether the textExtractionModelMetadata field is set. */ + @java.lang.Override public boolean hasTextExtractionModelMetadata() { return modelMetadataCase_ == 19; } @@ -777,6 +794,7 @@ public boolean hasTextExtractionModelMetadata() { * * @return The textExtractionModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionModelMetadata getTextExtractionModelMetadata() { if (modelMetadataCase_ == 19) { return (com.google.cloud.automl.v1.TextExtractionModelMetadata) modelMetadata_; @@ -793,6 +811,7 @@ public com.google.cloud.automl.v1.TextExtractionModelMetadata getTextExtractionM * .google.cloud.automl.v1.TextExtractionModelMetadata text_extraction_model_metadata = 19; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionModelMetadataOrBuilder getTextExtractionModelMetadataOrBuilder() { if (modelMetadataCase_ == 19) { @@ -814,6 +833,7 @@ public com.google.cloud.automl.v1.TextExtractionModelMetadata getTextExtractionM * * @return Whether the textSentimentModelMetadata field is set. */ + @java.lang.Override public boolean hasTextSentimentModelMetadata() { return modelMetadataCase_ == 22; } @@ -829,6 +849,7 @@ public boolean hasTextSentimentModelMetadata() { * * @return The textSentimentModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentModelMetadata getTextSentimentModelMetadata() { if (modelMetadataCase_ == 22) { return (com.google.cloud.automl.v1.TextSentimentModelMetadata) modelMetadata_; @@ -845,6 +866,7 @@ public com.google.cloud.automl.v1.TextSentimentModelMetadata getTextSentimentMod * .google.cloud.automl.v1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentModelMetadataOrBuilder getTextSentimentModelMetadataOrBuilder() { if (modelMetadataCase_ == 22) { @@ -867,6 +889,7 @@ public com.google.cloud.automl.v1.TextSentimentModelMetadata getTextSentimentMod * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -890,6 +913,7 @@ public java.lang.String getName() { * * @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) { @@ -918,6 +942,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return The displayName. */ + @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { @@ -943,6 +968,7 @@ public java.lang.String getDisplayName() { * * @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) { @@ -969,6 +995,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * @return The datasetId. */ + @java.lang.Override public java.lang.String getDatasetId() { java.lang.Object ref = datasetId_; if (ref instanceof java.lang.String) { @@ -992,6 +1019,7 @@ public java.lang.String getDatasetId() { * * @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) { @@ -1017,6 +1045,7 @@ public com.google.protobuf.ByteString getDatasetIdBytes() { * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -1031,6 +1060,7 @@ public boolean hasCreateTime() { * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -1043,6 +1073,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * .google.protobuf.Timestamp create_time = 7; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -1060,6 +1091,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -1074,6 +1106,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -1086,6 +1119,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 11; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -1104,6 +1138,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * @return The enum numeric value on the wire for deploymentState. */ + @java.lang.Override public int getDeploymentStateValue() { return deploymentState_; } @@ -1119,6 +1154,7 @@ public int getDeploymentStateValue() { * * @return The deploymentState. */ + @java.lang.Override public com.google.cloud.automl.v1.Model.DeploymentState getDeploymentState() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.Model.DeploymentState result = @@ -1140,6 +1176,7 @@ public com.google.cloud.automl.v1.Model.DeploymentState getDeploymentState() { * * @return The etag. */ + @java.lang.Override public java.lang.String getEtag() { java.lang.Object ref = etag_; if (ref instanceof java.lang.String) { @@ -1163,6 +1200,7 @@ public java.lang.String getEtag() { * * @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) { @@ -1214,6 +1252,7 @@ public int getLabelsCount() { * * map<string, string> labels = 34; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1221,6 +1260,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -1239,6 +1279,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 34; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -1256,6 +1297,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 34; */ + @java.lang.Override public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1277,6 +1319,7 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> labels = 34; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1990,6 +2033,7 @@ public Builder clearModelMetadata() { * * @return Whether the translationModelMetadata field is set. */ + @java.lang.Override public boolean hasTranslationModelMetadata() { return modelMetadataCase_ == 15; } @@ -2005,6 +2049,7 @@ public boolean hasTranslationModelMetadata() { * * @return The translationModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationModelMetadata getTranslationModelMetadata() { if (translationModelMetadataBuilder_ == null) { if (modelMetadataCase_ == 15) { @@ -2147,6 +2192,7 @@ public Builder clearTranslationModelMetadata() { * .google.cloud.automl.v1.TranslationModelMetadata translation_model_metadata = 15; * */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationModelMetadataOrBuilder getTranslationModelMetadataOrBuilder() { if ((modelMetadataCase_ == 15) && (translationModelMetadataBuilder_ != null)) { @@ -2211,6 +2257,7 @@ public Builder clearTranslationModelMetadata() { * * @return Whether the imageClassificationModelMetadata field is set. */ + @java.lang.Override public boolean hasImageClassificationModelMetadata() { return modelMetadataCase_ == 13; } @@ -2227,6 +2274,7 @@ public boolean hasImageClassificationModelMetadata() { * * @return The imageClassificationModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelMetadata getImageClassificationModelMetadata() { if (imageClassificationModelMetadataBuilder_ == null) { @@ -2377,6 +2425,7 @@ public Builder clearImageClassificationModelMetadata() { * .google.cloud.automl.v1.ImageClassificationModelMetadata image_classification_model_metadata = 13; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageClassificationModelMetadataOrBuilder getImageClassificationModelMetadataOrBuilder() { if ((modelMetadataCase_ == 13) && (imageClassificationModelMetadataBuilder_ != null)) { @@ -2443,6 +2492,7 @@ public Builder clearImageClassificationModelMetadata() { * * @return Whether the textClassificationModelMetadata field is set. */ + @java.lang.Override public boolean hasTextClassificationModelMetadata() { return modelMetadataCase_ == 14; } @@ -2459,6 +2509,7 @@ public boolean hasTextClassificationModelMetadata() { * * @return The textClassificationModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationModelMetadata getTextClassificationModelMetadata() { if (textClassificationModelMetadataBuilder_ == null) { @@ -2609,6 +2660,7 @@ public Builder clearTextClassificationModelMetadata() { * .google.cloud.automl.v1.TextClassificationModelMetadata text_classification_model_metadata = 14; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextClassificationModelMetadataOrBuilder getTextClassificationModelMetadataOrBuilder() { if ((modelMetadataCase_ == 14) && (textClassificationModelMetadataBuilder_ != null)) { @@ -2675,6 +2727,7 @@ public Builder clearTextClassificationModelMetadata() { * * @return Whether the imageObjectDetectionModelMetadata field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionModelMetadata() { return modelMetadataCase_ == 20; } @@ -2691,6 +2744,7 @@ public boolean hasImageObjectDetectionModelMetadata() { * * @return The imageObjectDetectionModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelMetadata getImageObjectDetectionModelMetadata() { if (imageObjectDetectionModelMetadataBuilder_ == null) { @@ -2841,6 +2895,7 @@ public Builder clearImageObjectDetectionModelMetadata() { * .google.cloud.automl.v1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionModelMetadataOrBuilder getImageObjectDetectionModelMetadataOrBuilder() { if ((modelMetadataCase_ == 20) && (imageObjectDetectionModelMetadataBuilder_ != null)) { @@ -2907,6 +2962,7 @@ public Builder clearImageObjectDetectionModelMetadata() { * * @return Whether the textExtractionModelMetadata field is set. */ + @java.lang.Override public boolean hasTextExtractionModelMetadata() { return modelMetadataCase_ == 19; } @@ -2923,6 +2979,7 @@ public boolean hasTextExtractionModelMetadata() { * * @return The textExtractionModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionModelMetadata getTextExtractionModelMetadata() { if (textExtractionModelMetadataBuilder_ == null) { if (modelMetadataCase_ == 19) { @@ -3071,6 +3128,7 @@ public Builder clearTextExtractionModelMetadata() { * .google.cloud.automl.v1.TextExtractionModelMetadata text_extraction_model_metadata = 19; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionModelMetadataOrBuilder getTextExtractionModelMetadataOrBuilder() { if ((modelMetadataCase_ == 19) && (textExtractionModelMetadataBuilder_ != null)) { @@ -3136,6 +3194,7 @@ public Builder clearTextExtractionModelMetadata() { * * @return Whether the textSentimentModelMetadata field is set. */ + @java.lang.Override public boolean hasTextSentimentModelMetadata() { return modelMetadataCase_ == 22; } @@ -3151,6 +3210,7 @@ public boolean hasTextSentimentModelMetadata() { * * @return The textSentimentModelMetadata. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentModelMetadata getTextSentimentModelMetadata() { if (textSentimentModelMetadataBuilder_ == null) { if (modelMetadataCase_ == 22) { @@ -3293,6 +3353,7 @@ public Builder clearTextSentimentModelMetadata() { * .google.cloud.automl.v1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentModelMetadataOrBuilder getTextSentimentModelMetadataOrBuilder() { if ((modelMetadataCase_ == 22) && (textSentimentModelMetadataBuilder_ != null)) { @@ -4062,6 +4123,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * @return The enum numeric value on the wire for deploymentState. */ + @java.lang.Override public int getDeploymentStateValue() { return deploymentState_; } @@ -4079,6 +4141,7 @@ public int getDeploymentStateValue() { * @return This builder for chaining. */ public Builder setDeploymentStateValue(int value) { + deploymentState_ = value; onChanged(); return this; @@ -4095,6 +4158,7 @@ public Builder setDeploymentStateValue(int value) { * * @return The deploymentState. */ + @java.lang.Override public com.google.cloud.automl.v1.Model.DeploymentState getDeploymentState() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.Model.DeploymentState result = @@ -4294,6 +4358,7 @@ public int getLabelsCount() { * * map<string, string> labels = 34; */ + @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -4301,6 +4366,7 @@ public boolean containsLabels(java.lang.String key) { return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); @@ -4319,6 +4385,7 @@ public java.util.Map getLabels() { * * map<string, string> labels = 34; */ + @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } @@ -4336,6 +4403,7 @@ public java.util.Map getLabelsMap() { * * map<string, string> labels = 34; */ + @java.lang.Override public java.lang.String getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -4358,6 +4426,7 @@ public java.lang.String getLabelsOrDefault( * * map<string, string> labels = 34; */ + @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluation.java index f4893d5a2..aa43c7f3d 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluation.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelEvaluation.java @@ -321,6 +321,7 @@ public MetricsCase getMetricsCase() { * * @return Whether the classificationEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasClassificationEvaluationMetrics() { return metricsCase_ == 8; } @@ -340,6 +341,7 @@ public boolean hasClassificationEvaluationMetrics() { * * @return The classificationEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics getClassificationEvaluationMetrics() { if (metricsCase_ == 8) { @@ -361,6 +363,7 @@ public boolean hasClassificationEvaluationMetrics() { * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetricsOrBuilder getClassificationEvaluationMetricsOrBuilder() { if (metricsCase_ == 8) { @@ -382,6 +385,7 @@ public boolean hasClassificationEvaluationMetrics() { * * @return Whether the translationEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasTranslationEvaluationMetrics() { return metricsCase_ == 9; } @@ -397,6 +401,7 @@ public boolean hasTranslationEvaluationMetrics() { * * @return The translationEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEvaluationMetrics() { if (metricsCase_ == 9) { return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; @@ -413,6 +418,7 @@ public com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEva * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; * */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder getTranslationEvaluationMetricsOrBuilder() { if (metricsCase_ == 9) { @@ -435,6 +441,7 @@ public com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEva * * @return Whether the imageObjectDetectionEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionEvaluationMetrics() { return metricsCase_ == 12; } @@ -451,6 +458,7 @@ public boolean hasImageObjectDetectionEvaluationMetrics() { * * @return The imageObjectDetectionEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics getImageObjectDetectionEvaluationMetrics() { if (metricsCase_ == 12) { @@ -469,6 +477,7 @@ public boolean hasImageObjectDetectionEvaluationMetrics() { * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsOrBuilder getImageObjectDetectionEvaluationMetricsOrBuilder() { if (metricsCase_ == 12) { @@ -491,6 +500,7 @@ public boolean hasImageObjectDetectionEvaluationMetrics() { * * @return Whether the textSentimentEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasTextSentimentEvaluationMetrics() { return metricsCase_ == 11; } @@ -507,6 +517,7 @@ public boolean hasTextSentimentEvaluationMetrics() { * * @return The textSentimentEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentEvaluationMetrics getTextSentimentEvaluationMetrics() { if (metricsCase_ == 11) { @@ -525,6 +536,7 @@ public boolean hasTextSentimentEvaluationMetrics() { * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentEvaluationMetricsOrBuilder getTextSentimentEvaluationMetricsOrBuilder() { if (metricsCase_ == 11) { @@ -547,6 +559,7 @@ public boolean hasTextSentimentEvaluationMetrics() { * * @return Whether the textExtractionEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasTextExtractionEvaluationMetrics() { return metricsCase_ == 13; } @@ -563,6 +576,7 @@ public boolean hasTextExtractionEvaluationMetrics() { * * @return The textExtractionEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionEvaluationMetrics getTextExtractionEvaluationMetrics() { if (metricsCase_ == 13) { @@ -581,6 +595,7 @@ public boolean hasTextExtractionEvaluationMetrics() { * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionEvaluationMetricsOrBuilder getTextExtractionEvaluationMetricsOrBuilder() { if (metricsCase_ == 13) { @@ -604,6 +619,7 @@ public boolean hasTextExtractionEvaluationMetrics() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -628,6 +644,7 @@ public java.lang.String getName() { * * @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) { @@ -660,6 +677,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return The annotationSpecId. */ + @java.lang.Override public java.lang.String getAnnotationSpecId() { java.lang.Object ref = annotationSpecId_; if (ref instanceof java.lang.String) { @@ -689,6 +707,7 @@ public java.lang.String getAnnotationSpecId() { * * @return The bytes for annotationSpecId. */ + @java.lang.Override public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { java.lang.Object ref = annotationSpecId_; if (ref instanceof java.lang.String) { @@ -723,6 +742,7 @@ public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { * * @return The displayName. */ + @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { @@ -754,6 +774,7 @@ public java.lang.String getDisplayName() { * * @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) { @@ -779,6 +800,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -793,6 +815,7 @@ public boolean hasCreateTime() { * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -805,6 +828,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * .google.protobuf.Timestamp create_time = 5; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -829,6 +853,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return The evaluatedExampleCount. */ + @java.lang.Override public int getEvaluatedExampleCount() { return evaluatedExampleCount_; } @@ -1420,6 +1445,7 @@ public Builder clearMetrics() { * * @return Whether the classificationEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasClassificationEvaluationMetrics() { return metricsCase_ == 8; } @@ -1439,6 +1465,7 @@ public boolean hasClassificationEvaluationMetrics() { * * @return The classificationEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics getClassificationEvaluationMetrics() { if (classificationEvaluationMetricsBuilder_ == null) { @@ -1607,6 +1634,7 @@ public Builder clearClassificationEvaluationMetrics() { * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetricsOrBuilder getClassificationEvaluationMetricsOrBuilder() { if ((metricsCase_ == 8) && (classificationEvaluationMetricsBuilder_ != null)) { @@ -1676,6 +1704,7 @@ public Builder clearClassificationEvaluationMetrics() { * * @return Whether the translationEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasTranslationEvaluationMetrics() { return metricsCase_ == 9; } @@ -1692,6 +1721,7 @@ public boolean hasTranslationEvaluationMetrics() { * * @return The translationEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEvaluationMetrics() { if (translationEvaluationMetricsBuilder_ == null) { @@ -1841,6 +1871,7 @@ public Builder clearTranslationEvaluationMetrics() { * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; * */ + @java.lang.Override public com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder getTranslationEvaluationMetricsOrBuilder() { if ((metricsCase_ == 9) && (translationEvaluationMetricsBuilder_ != null)) { @@ -1906,6 +1937,7 @@ public Builder clearTranslationEvaluationMetrics() { * * @return Whether the imageObjectDetectionEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasImageObjectDetectionEvaluationMetrics() { return metricsCase_ == 12; } @@ -1922,6 +1954,7 @@ public boolean hasImageObjectDetectionEvaluationMetrics() { * * @return The imageObjectDetectionEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics getImageObjectDetectionEvaluationMetrics() { if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { @@ -2074,6 +2107,7 @@ public Builder clearImageObjectDetectionEvaluationMetrics() { * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; * */ + @java.lang.Override public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsOrBuilder getImageObjectDetectionEvaluationMetricsOrBuilder() { if ((metricsCase_ == 12) && (imageObjectDetectionEvaluationMetricsBuilder_ != null)) { @@ -2141,6 +2175,7 @@ public Builder clearImageObjectDetectionEvaluationMetrics() { * * @return Whether the textSentimentEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasTextSentimentEvaluationMetrics() { return metricsCase_ == 11; } @@ -2157,6 +2192,7 @@ public boolean hasTextSentimentEvaluationMetrics() { * * @return The textSentimentEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentEvaluationMetrics getTextSentimentEvaluationMetrics() { if (textSentimentEvaluationMetricsBuilder_ == null) { @@ -2306,6 +2342,7 @@ public Builder clearTextSentimentEvaluationMetrics() { * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextSentimentEvaluationMetricsOrBuilder getTextSentimentEvaluationMetricsOrBuilder() { if ((metricsCase_ == 11) && (textSentimentEvaluationMetricsBuilder_ != null)) { @@ -2371,6 +2408,7 @@ public Builder clearTextSentimentEvaluationMetrics() { * * @return Whether the textExtractionEvaluationMetrics field is set. */ + @java.lang.Override public boolean hasTextExtractionEvaluationMetrics() { return metricsCase_ == 13; } @@ -2387,6 +2425,7 @@ public boolean hasTextExtractionEvaluationMetrics() { * * @return The textExtractionEvaluationMetrics. */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionEvaluationMetrics getTextExtractionEvaluationMetrics() { if (textExtractionEvaluationMetricsBuilder_ == null) { @@ -2537,6 +2576,7 @@ public Builder clearTextExtractionEvaluationMetrics() { * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionEvaluationMetricsOrBuilder getTextExtractionEvaluationMetricsOrBuilder() { if ((metricsCase_ == 13) && (textExtractionEvaluationMetricsBuilder_ != null)) { @@ -3195,6 +3235,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return The evaluatedExampleCount. */ + @java.lang.Override public int getEvaluatedExampleCount() { return evaluatedExampleCount_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelExportOutputConfig.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelExportOutputConfig.java index e355b206a..cc9601322 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelExportOutputConfig.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/ModelExportOutputConfig.java @@ -217,6 +217,7 @@ public DestinationCase getDestinationCase() { * * @return Whether the gcsDestination field is set. */ + @java.lang.Override public boolean hasGcsDestination() { return destinationCase_ == 1; } @@ -240,6 +241,7 @@ public boolean hasGcsDestination() { * * @return The gcsDestination. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { if (destinationCase_ == 1) { return (com.google.cloud.automl.v1.GcsDestination) destination_; @@ -264,6 +266,7 @@ public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { * .google.cloud.automl.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { if (destinationCase_ == 1) { return (com.google.cloud.automl.v1.GcsDestination) destination_; @@ -311,6 +314,7 @@ public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBui * * @return The modelFormat. */ + @java.lang.Override public java.lang.String getModelFormat() { java.lang.Object ref = modelFormat_; if (ref instanceof java.lang.String) { @@ -360,6 +364,7 @@ public java.lang.String getModelFormat() { * * @return The bytes for modelFormat. */ + @java.lang.Override public com.google.protobuf.ByteString getModelFormatBytes() { java.lang.Object ref = modelFormat_; if (ref instanceof java.lang.String) { @@ -411,6 +416,7 @@ public int getParamsCount() { * * map<string, string> params = 2; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -418,6 +424,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -436,6 +443,7 @@ public java.util.Map getParams() { * * map<string, string> params = 2; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -453,6 +461,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -474,6 +483,7 @@ public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -931,6 +941,7 @@ public Builder clearDestination() { * * @return Whether the gcsDestination field is set. */ + @java.lang.Override public boolean hasGcsDestination() { return destinationCase_ == 1; } @@ -954,6 +965,7 @@ public boolean hasGcsDestination() { * * @return The gcsDestination. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { if (gcsDestinationBuilder_ == null) { if (destinationCase_ == 1) { @@ -1140,6 +1152,7 @@ public com.google.cloud.automl.v1.GcsDestination.Builder getGcsDestinationBuilde * .google.cloud.automl.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { return gcsDestinationBuilder_.getMessageOrBuilder(); @@ -1473,6 +1486,7 @@ public int getParamsCount() { * * map<string, string> params = 2; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1480,6 +1494,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -1498,6 +1513,7 @@ public java.util.Map getParams() { * * map<string, string> params = 2; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -1515,6 +1531,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1537,6 +1554,7 @@ public java.lang.String getParamsOrDefault( * * map<string, string> params = 2; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/NormalizedVertex.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/NormalizedVertex.java index 9389c8fe6..b999b0d41 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/NormalizedVertex.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/NormalizedVertex.java @@ -129,6 +129,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The x. */ + @java.lang.Override public float getX() { return x_; } @@ -146,6 +147,7 @@ public float getX() { * * @return The y. */ + @java.lang.Override public float getY() { return y_; } @@ -498,6 +500,7 @@ public Builder mergeFrom( * * @return The x. */ + @java.lang.Override public float getX() { return x_; } @@ -549,6 +552,7 @@ public Builder clearX() { * * @return The y. */ + @java.lang.Override public float getY() { return y_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OperationMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OperationMetadata.java index 94b8e70fc..f183e108e 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OperationMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OperationMetadata.java @@ -409,6 +409,7 @@ public DetailsCase getDetailsCase() { * * @return Whether the deleteDetails field is set. */ + @java.lang.Override public boolean hasDeleteDetails() { return detailsCase_ == 8; } @@ -423,6 +424,7 @@ public boolean hasDeleteDetails() { * * @return The deleteDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.DeleteOperationMetadata getDeleteDetails() { if (detailsCase_ == 8) { return (com.google.cloud.automl.v1.DeleteOperationMetadata) details_; @@ -438,6 +440,7 @@ public com.google.cloud.automl.v1.DeleteOperationMetadata getDeleteDetails() { * * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; */ + @java.lang.Override public com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder getDeleteDetailsOrBuilder() { if (detailsCase_ == 8) { return (com.google.cloud.automl.v1.DeleteOperationMetadata) details_; @@ -457,6 +460,7 @@ public com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder getDeleteDeta * * @return Whether the deployModelDetails field is set. */ + @java.lang.Override public boolean hasDeployModelDetails() { return detailsCase_ == 24; } @@ -471,6 +475,7 @@ public boolean hasDeployModelDetails() { * * @return The deployModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.DeployModelOperationMetadata getDeployModelDetails() { if (detailsCase_ == 24) { return (com.google.cloud.automl.v1.DeployModelOperationMetadata) details_; @@ -486,6 +491,7 @@ public com.google.cloud.automl.v1.DeployModelOperationMetadata getDeployModelDet * * .google.cloud.automl.v1.DeployModelOperationMetadata deploy_model_details = 24; */ + @java.lang.Override public com.google.cloud.automl.v1.DeployModelOperationMetadataOrBuilder getDeployModelDetailsOrBuilder() { if (detailsCase_ == 24) { @@ -507,6 +513,7 @@ public com.google.cloud.automl.v1.DeployModelOperationMetadata getDeployModelDet * * @return Whether the undeployModelDetails field is set. */ + @java.lang.Override public boolean hasUndeployModelDetails() { return detailsCase_ == 25; } @@ -522,6 +529,7 @@ public boolean hasUndeployModelDetails() { * * @return The undeployModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.UndeployModelOperationMetadata getUndeployModelDetails() { if (detailsCase_ == 25) { return (com.google.cloud.automl.v1.UndeployModelOperationMetadata) details_; @@ -538,6 +546,7 @@ public com.google.cloud.automl.v1.UndeployModelOperationMetadata getUndeployMode * .google.cloud.automl.v1.UndeployModelOperationMetadata undeploy_model_details = 25; * */ + @java.lang.Override public com.google.cloud.automl.v1.UndeployModelOperationMetadataOrBuilder getUndeployModelDetailsOrBuilder() { if (detailsCase_ == 25) { @@ -558,6 +567,7 @@ public com.google.cloud.automl.v1.UndeployModelOperationMetadata getUndeployMode * * @return Whether the createModelDetails field is set. */ + @java.lang.Override public boolean hasCreateModelDetails() { return detailsCase_ == 10; } @@ -572,6 +582,7 @@ public boolean hasCreateModelDetails() { * * @return The createModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.CreateModelOperationMetadata getCreateModelDetails() { if (detailsCase_ == 10) { return (com.google.cloud.automl.v1.CreateModelOperationMetadata) details_; @@ -587,6 +598,7 @@ public com.google.cloud.automl.v1.CreateModelOperationMetadata getCreateModelDet * * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; */ + @java.lang.Override public com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder getCreateModelDetailsOrBuilder() { if (detailsCase_ == 10) { @@ -608,6 +620,7 @@ public com.google.cloud.automl.v1.CreateModelOperationMetadata getCreateModelDet * * @return Whether the createDatasetDetails field is set. */ + @java.lang.Override public boolean hasCreateDatasetDetails() { return detailsCase_ == 30; } @@ -623,6 +636,7 @@ public boolean hasCreateDatasetDetails() { * * @return The createDatasetDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.CreateDatasetOperationMetadata getCreateDatasetDetails() { if (detailsCase_ == 30) { return (com.google.cloud.automl.v1.CreateDatasetOperationMetadata) details_; @@ -639,6 +653,7 @@ public com.google.cloud.automl.v1.CreateDatasetOperationMetadata getCreateDatase * .google.cloud.automl.v1.CreateDatasetOperationMetadata create_dataset_details = 30; * */ + @java.lang.Override public com.google.cloud.automl.v1.CreateDatasetOperationMetadataOrBuilder getCreateDatasetDetailsOrBuilder() { if (detailsCase_ == 30) { @@ -659,6 +674,7 @@ public com.google.cloud.automl.v1.CreateDatasetOperationMetadata getCreateDatase * * @return Whether the importDataDetails field is set. */ + @java.lang.Override public boolean hasImportDataDetails() { return detailsCase_ == 15; } @@ -673,6 +689,7 @@ public boolean hasImportDataDetails() { * * @return The importDataDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.ImportDataOperationMetadata getImportDataDetails() { if (detailsCase_ == 15) { return (com.google.cloud.automl.v1.ImportDataOperationMetadata) details_; @@ -688,6 +705,7 @@ public com.google.cloud.automl.v1.ImportDataOperationMetadata getImportDataDetai * * .google.cloud.automl.v1.ImportDataOperationMetadata import_data_details = 15; */ + @java.lang.Override public com.google.cloud.automl.v1.ImportDataOperationMetadataOrBuilder getImportDataDetailsOrBuilder() { if (detailsCase_ == 15) { @@ -708,6 +726,7 @@ public com.google.cloud.automl.v1.ImportDataOperationMetadata getImportDataDetai * * @return Whether the batchPredictDetails field is set. */ + @java.lang.Override public boolean hasBatchPredictDetails() { return detailsCase_ == 16; } @@ -722,6 +741,7 @@ public boolean hasBatchPredictDetails() { * * @return The batchPredictDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOperationMetadata getBatchPredictDetails() { if (detailsCase_ == 16) { return (com.google.cloud.automl.v1.BatchPredictOperationMetadata) details_; @@ -737,6 +757,7 @@ public com.google.cloud.automl.v1.BatchPredictOperationMetadata getBatchPredictD * * .google.cloud.automl.v1.BatchPredictOperationMetadata batch_predict_details = 16; */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOperationMetadataOrBuilder getBatchPredictDetailsOrBuilder() { if (detailsCase_ == 16) { @@ -757,6 +778,7 @@ public com.google.cloud.automl.v1.BatchPredictOperationMetadata getBatchPredictD * * @return Whether the exportDataDetails field is set. */ + @java.lang.Override public boolean hasExportDataDetails() { return detailsCase_ == 21; } @@ -771,6 +793,7 @@ public boolean hasExportDataDetails() { * * @return The exportDataDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.ExportDataOperationMetadata getExportDataDetails() { if (detailsCase_ == 21) { return (com.google.cloud.automl.v1.ExportDataOperationMetadata) details_; @@ -786,6 +809,7 @@ public com.google.cloud.automl.v1.ExportDataOperationMetadata getExportDataDetai * * .google.cloud.automl.v1.ExportDataOperationMetadata export_data_details = 21; */ + @java.lang.Override public com.google.cloud.automl.v1.ExportDataOperationMetadataOrBuilder getExportDataDetailsOrBuilder() { if (detailsCase_ == 21) { @@ -806,6 +830,7 @@ public com.google.cloud.automl.v1.ExportDataOperationMetadata getExportDataDetai * * @return Whether the exportModelDetails field is set. */ + @java.lang.Override public boolean hasExportModelDetails() { return detailsCase_ == 22; } @@ -820,6 +845,7 @@ public boolean hasExportModelDetails() { * * @return The exportModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.ExportModelOperationMetadata getExportModelDetails() { if (detailsCase_ == 22) { return (com.google.cloud.automl.v1.ExportModelOperationMetadata) details_; @@ -835,6 +861,7 @@ public com.google.cloud.automl.v1.ExportModelOperationMetadata getExportModelDet * * .google.cloud.automl.v1.ExportModelOperationMetadata export_model_details = 22; */ + @java.lang.Override public com.google.cloud.automl.v1.ExportModelOperationMetadataOrBuilder getExportModelDetailsOrBuilder() { if (detailsCase_ == 22) { @@ -857,6 +884,7 @@ public com.google.cloud.automl.v1.ExportModelOperationMetadata getExportModelDet * * @return The progressPercent. */ + @java.lang.Override public int getProgressPercent() { return progressPercent_; } @@ -875,6 +903,7 @@ public int getProgressPercent() { * * repeated .google.rpc.Status partial_failures = 2; */ + @java.lang.Override public java.util.List getPartialFailuresList() { return partialFailures_; } @@ -890,6 +919,7 @@ public java.util.List getPartialFailuresList() { * * repeated .google.rpc.Status partial_failures = 2; */ + @java.lang.Override public java.util.List getPartialFailuresOrBuilderList() { return partialFailures_; @@ -906,6 +936,7 @@ public java.util.List getPartialFailuresList() { * * repeated .google.rpc.Status partial_failures = 2; */ + @java.lang.Override public int getPartialFailuresCount() { return partialFailures_.size(); } @@ -921,6 +952,7 @@ public int getPartialFailuresCount() { * * repeated .google.rpc.Status partial_failures = 2; */ + @java.lang.Override public com.google.rpc.Status getPartialFailures(int index) { return partialFailures_.get(index); } @@ -936,6 +968,7 @@ public com.google.rpc.Status getPartialFailures(int index) { * * repeated .google.rpc.Status partial_failures = 2; */ + @java.lang.Override public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { return partialFailures_.get(index); } @@ -953,6 +986,7 @@ public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { * * @return Whether the createTime field is set. */ + @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } @@ -967,6 +1001,7 @@ public boolean hasCreateTime() { * * @return The createTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } @@ -979,6 +1014,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * .google.protobuf.Timestamp create_time = 3; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return getCreateTime(); } @@ -996,6 +1032,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * @return Whether the updateTime field is set. */ + @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } @@ -1010,6 +1047,7 @@ public boolean hasUpdateTime() { * * @return The updateTime. */ + @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } @@ -1022,6 +1060,7 @@ public com.google.protobuf.Timestamp getUpdateTime() { * * .google.protobuf.Timestamp update_time = 4; */ + @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return getUpdateTime(); } @@ -1746,6 +1785,7 @@ public Builder clearDetails() { * * @return Whether the deleteDetails field is set. */ + @java.lang.Override public boolean hasDeleteDetails() { return detailsCase_ == 8; } @@ -1760,6 +1800,7 @@ public boolean hasDeleteDetails() { * * @return The deleteDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.DeleteOperationMetadata getDeleteDetails() { if (deleteDetailsBuilder_ == null) { if (detailsCase_ == 8) { @@ -1893,6 +1934,7 @@ public com.google.cloud.automl.v1.DeleteOperationMetadata.Builder getDeleteDetai * * .google.cloud.automl.v1.DeleteOperationMetadata delete_details = 8; */ + @java.lang.Override public com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder getDeleteDetailsOrBuilder() { if ((detailsCase_ == 8) && (deleteDetailsBuilder_ != null)) { return deleteDetailsBuilder_.getMessageOrBuilder(); @@ -1953,6 +1995,7 @@ public com.google.cloud.automl.v1.DeleteOperationMetadataOrBuilder getDeleteDeta * * @return Whether the deployModelDetails field is set. */ + @java.lang.Override public boolean hasDeployModelDetails() { return detailsCase_ == 24; } @@ -1967,6 +2010,7 @@ public boolean hasDeployModelDetails() { * * @return The deployModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.DeployModelOperationMetadata getDeployModelDetails() { if (deployModelDetailsBuilder_ == null) { if (detailsCase_ == 24) { @@ -2103,6 +2147,7 @@ public Builder clearDeployModelDetails() { * * .google.cloud.automl.v1.DeployModelOperationMetadata deploy_model_details = 24; */ + @java.lang.Override public com.google.cloud.automl.v1.DeployModelOperationMetadataOrBuilder getDeployModelDetailsOrBuilder() { if ((detailsCase_ == 24) && (deployModelDetailsBuilder_ != null)) { @@ -2165,6 +2210,7 @@ public Builder clearDeployModelDetails() { * * @return Whether the undeployModelDetails field is set. */ + @java.lang.Override public boolean hasUndeployModelDetails() { return detailsCase_ == 25; } @@ -2180,6 +2226,7 @@ public boolean hasUndeployModelDetails() { * * @return The undeployModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.UndeployModelOperationMetadata getUndeployModelDetails() { if (undeployModelDetailsBuilder_ == null) { if (detailsCase_ == 25) { @@ -2322,6 +2369,7 @@ public Builder clearUndeployModelDetails() { * .google.cloud.automl.v1.UndeployModelOperationMetadata undeploy_model_details = 25; * */ + @java.lang.Override public com.google.cloud.automl.v1.UndeployModelOperationMetadataOrBuilder getUndeployModelDetailsOrBuilder() { if ((detailsCase_ == 25) && (undeployModelDetailsBuilder_ != null)) { @@ -2384,6 +2432,7 @@ public Builder clearUndeployModelDetails() { * * @return Whether the createModelDetails field is set. */ + @java.lang.Override public boolean hasCreateModelDetails() { return detailsCase_ == 10; } @@ -2398,6 +2447,7 @@ public boolean hasCreateModelDetails() { * * @return The createModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.CreateModelOperationMetadata getCreateModelDetails() { if (createModelDetailsBuilder_ == null) { if (detailsCase_ == 10) { @@ -2534,6 +2584,7 @@ public Builder clearCreateModelDetails() { * * .google.cloud.automl.v1.CreateModelOperationMetadata create_model_details = 10; */ + @java.lang.Override public com.google.cloud.automl.v1.CreateModelOperationMetadataOrBuilder getCreateModelDetailsOrBuilder() { if ((detailsCase_ == 10) && (createModelDetailsBuilder_ != null)) { @@ -2596,6 +2647,7 @@ public Builder clearCreateModelDetails() { * * @return Whether the createDatasetDetails field is set. */ + @java.lang.Override public boolean hasCreateDatasetDetails() { return detailsCase_ == 30; } @@ -2611,6 +2663,7 @@ public boolean hasCreateDatasetDetails() { * * @return The createDatasetDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.CreateDatasetOperationMetadata getCreateDatasetDetails() { if (createDatasetDetailsBuilder_ == null) { if (detailsCase_ == 30) { @@ -2753,6 +2806,7 @@ public Builder clearCreateDatasetDetails() { * .google.cloud.automl.v1.CreateDatasetOperationMetadata create_dataset_details = 30; * */ + @java.lang.Override public com.google.cloud.automl.v1.CreateDatasetOperationMetadataOrBuilder getCreateDatasetDetailsOrBuilder() { if ((detailsCase_ == 30) && (createDatasetDetailsBuilder_ != null)) { @@ -2815,6 +2869,7 @@ public Builder clearCreateDatasetDetails() { * * @return Whether the importDataDetails field is set. */ + @java.lang.Override public boolean hasImportDataDetails() { return detailsCase_ == 15; } @@ -2829,6 +2884,7 @@ public boolean hasImportDataDetails() { * * @return The importDataDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.ImportDataOperationMetadata getImportDataDetails() { if (importDataDetailsBuilder_ == null) { if (detailsCase_ == 15) { @@ -2965,6 +3021,7 @@ public Builder clearImportDataDetails() { * * .google.cloud.automl.v1.ImportDataOperationMetadata import_data_details = 15; */ + @java.lang.Override public com.google.cloud.automl.v1.ImportDataOperationMetadataOrBuilder getImportDataDetailsOrBuilder() { if ((detailsCase_ == 15) && (importDataDetailsBuilder_ != null)) { @@ -3027,6 +3084,7 @@ public Builder clearImportDataDetails() { * * @return Whether the batchPredictDetails field is set. */ + @java.lang.Override public boolean hasBatchPredictDetails() { return detailsCase_ == 16; } @@ -3042,6 +3100,7 @@ public boolean hasBatchPredictDetails() { * * @return The batchPredictDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOperationMetadata getBatchPredictDetails() { if (batchPredictDetailsBuilder_ == null) { if (detailsCase_ == 16) { @@ -3184,6 +3243,7 @@ public Builder clearBatchPredictDetails() { * .google.cloud.automl.v1.BatchPredictOperationMetadata batch_predict_details = 16; * */ + @java.lang.Override public com.google.cloud.automl.v1.BatchPredictOperationMetadataOrBuilder getBatchPredictDetailsOrBuilder() { if ((detailsCase_ == 16) && (batchPredictDetailsBuilder_ != null)) { @@ -3246,6 +3306,7 @@ public Builder clearBatchPredictDetails() { * * @return Whether the exportDataDetails field is set. */ + @java.lang.Override public boolean hasExportDataDetails() { return detailsCase_ == 21; } @@ -3260,6 +3321,7 @@ public boolean hasExportDataDetails() { * * @return The exportDataDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.ExportDataOperationMetadata getExportDataDetails() { if (exportDataDetailsBuilder_ == null) { if (detailsCase_ == 21) { @@ -3396,6 +3458,7 @@ public Builder clearExportDataDetails() { * * .google.cloud.automl.v1.ExportDataOperationMetadata export_data_details = 21; */ + @java.lang.Override public com.google.cloud.automl.v1.ExportDataOperationMetadataOrBuilder getExportDataDetailsOrBuilder() { if ((detailsCase_ == 21) && (exportDataDetailsBuilder_ != null)) { @@ -3457,6 +3520,7 @@ public Builder clearExportDataDetails() { * * @return Whether the exportModelDetails field is set. */ + @java.lang.Override public boolean hasExportModelDetails() { return detailsCase_ == 22; } @@ -3471,6 +3535,7 @@ public boolean hasExportModelDetails() { * * @return The exportModelDetails. */ + @java.lang.Override public com.google.cloud.automl.v1.ExportModelOperationMetadata getExportModelDetails() { if (exportModelDetailsBuilder_ == null) { if (detailsCase_ == 22) { @@ -3607,6 +3672,7 @@ public Builder clearExportModelDetails() { * * .google.cloud.automl.v1.ExportModelOperationMetadata export_model_details = 22; */ + @java.lang.Override public com.google.cloud.automl.v1.ExportModelOperationMetadataOrBuilder getExportModelDetailsOrBuilder() { if ((detailsCase_ == 22) && (exportModelDetailsBuilder_ != null)) { @@ -3665,6 +3731,7 @@ public Builder clearExportModelDetails() { * * @return The progressPercent. */ + @java.lang.Override public int getProgressPercent() { return progressPercent_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OutputConfig.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OutputConfig.java index 02031c5a8..758fc5e56 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OutputConfig.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/OutputConfig.java @@ -207,6 +207,7 @@ public DestinationCase getDestinationCase() { * * @return Whether the gcsDestination field is set. */ + @java.lang.Override public boolean hasGcsDestination() { return destinationCase_ == 1; } @@ -228,6 +229,7 @@ public boolean hasGcsDestination() { * * @return The gcsDestination. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { if (destinationCase_ == 1) { return (com.google.cloud.automl.v1.GcsDestination) destination_; @@ -250,6 +252,7 @@ public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { * .google.cloud.automl.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { if (destinationCase_ == 1) { return (com.google.cloud.automl.v1.GcsDestination) destination_; @@ -664,6 +667,7 @@ public Builder clearDestination() { * * @return Whether the gcsDestination field is set. */ + @java.lang.Override public boolean hasGcsDestination() { return destinationCase_ == 1; } @@ -685,6 +689,7 @@ public boolean hasGcsDestination() { * * @return The gcsDestination. */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestination getGcsDestination() { if (gcsDestinationBuilder_ == null) { if (destinationCase_ == 1) { @@ -859,6 +864,7 @@ public com.google.cloud.automl.v1.GcsDestination.Builder getGcsDestinationBuilde * .google.cloud.automl.v1.GcsDestination gcs_destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { return gcsDestinationBuilder_.getMessageOrBuilder(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequest.java index 06fb7ea51..6580798c9 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictRequest.java @@ -167,6 +167,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -191,6 +192,7 @@ public java.lang.String getName() { * * @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) { @@ -219,6 +221,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * @return Whether the payload field is set. */ + @java.lang.Override public boolean hasPayload() { return payload_ != null; } @@ -236,6 +239,7 @@ public boolean hasPayload() { * * @return The payload. */ + @java.lang.Override public com.google.cloud.automl.v1.ExamplePayload getPayload() { return payload_ == null ? com.google.cloud.automl.v1.ExamplePayload.getDefaultInstance() @@ -253,6 +257,7 @@ public com.google.cloud.automl.v1.ExamplePayload getPayload() { * .google.cloud.automl.v1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.ExamplePayloadOrBuilder getPayloadOrBuilder() { return getPayload(); } @@ -313,6 +318,7 @@ public int getParamsCount() { * * map<string, string> params = 3; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -320,6 +326,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -355,6 +362,7 @@ public java.util.Map getParams() { * * map<string, string> params = 3; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -389,6 +397,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 3; */ + @java.lang.Override public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); @@ -427,6 +436,7 @@ public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.Strin * * map<string, string> params = 3; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1210,6 +1220,7 @@ public int getParamsCount() { * * map<string, string> params = 3; */ + @java.lang.Override public boolean containsParams(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1217,6 +1228,7 @@ public boolean containsParams(java.lang.String key) { return internalGetParams().getMap().containsKey(key); } /** Use {@link #getParamsMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getParams() { return getParamsMap(); @@ -1252,6 +1264,7 @@ public java.util.Map getParams() { * * map<string, string> params = 3; */ + @java.lang.Override public java.util.Map getParamsMap() { return internalGetParams().getMap(); } @@ -1286,6 +1299,7 @@ public java.util.Map getParamsMap() { * * map<string, string> params = 3; */ + @java.lang.Override public java.lang.String getParamsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1325,6 +1339,7 @@ public java.lang.String getParamsOrDefault( * * map<string, string> params = 3; */ + @java.lang.Override public java.lang.String getParamsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponse.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponse.java index f5702c897..2b6a2630f 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponse.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/PredictResponse.java @@ -174,6 +174,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { * * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; */ + @java.lang.Override public java.util.List getPayloadList() { return payload_; } @@ -188,6 +189,7 @@ public java.util.List getPayloadLi * * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; */ + @java.lang.Override public java.util.List getPayloadOrBuilderList() { return payload_; @@ -203,6 +205,7 @@ public java.util.List getPayloadLi * * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; */ + @java.lang.Override public int getPayloadCount() { return payload_.size(); } @@ -217,6 +220,7 @@ public int getPayloadCount() { * * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.AnnotationPayload getPayload(int index) { return payload_.get(index); } @@ -231,6 +235,7 @@ public com.google.cloud.automl.v1.AnnotationPayload getPayload(int index) { * * repeated .google.cloud.automl.v1.AnnotationPayload payload = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index) { return payload_.get(index); } @@ -254,6 +259,7 @@ public com.google.cloud.automl.v1.AnnotationPayloadOrBuilder getPayloadOrBuilder * * @return Whether the preprocessedInput field is set. */ + @java.lang.Override public boolean hasPreprocessedInput() { return preprocessedInput_ != null; } @@ -274,6 +280,7 @@ public boolean hasPreprocessedInput() { * * @return The preprocessedInput. */ + @java.lang.Override public com.google.cloud.automl.v1.ExamplePayload getPreprocessedInput() { return preprocessedInput_ == null ? com.google.cloud.automl.v1.ExamplePayload.getDefaultInstance() @@ -294,6 +301,7 @@ public com.google.cloud.automl.v1.ExamplePayload getPreprocessedInput() { * * .google.cloud.automl.v1.ExamplePayload preprocessed_input = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.ExamplePayloadOrBuilder getPreprocessedInputOrBuilder() { return getPreprocessedInput(); } @@ -345,6 +353,7 @@ public int getMetadataCount() { * * map<string, string> metadata = 2; */ + @java.lang.Override public boolean containsMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -352,6 +361,7 @@ public boolean containsMetadata(java.lang.String key) { return internalGetMetadata().getMap().containsKey(key); } /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); @@ -378,6 +388,7 @@ public java.util.Map getMetadata() { * * map<string, string> metadata = 2; */ + @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } @@ -403,6 +414,7 @@ public java.util.Map getMetadataMap() { * * map<string, string> metadata = 2; */ + @java.lang.Override public java.lang.String getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -433,6 +445,7 @@ public java.lang.String getMetadataOrDefault( * * map<string, string> metadata = 2; */ + @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1545,6 +1558,7 @@ public int getMetadataCount() { * * map<string, string> metadata = 2; */ + @java.lang.Override public boolean containsMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); @@ -1552,6 +1566,7 @@ public boolean containsMetadata(java.lang.String key) { return internalGetMetadata().getMap().containsKey(key); } /** Use {@link #getMetadataMap()} instead. */ + @java.lang.Override @java.lang.Deprecated public java.util.Map getMetadata() { return getMetadataMap(); @@ -1578,6 +1593,7 @@ public java.util.Map getMetadata() { * * map<string, string> metadata = 2; */ + @java.lang.Override public java.util.Map getMetadataMap() { return internalGetMetadata().getMap(); } @@ -1603,6 +1619,7 @@ public java.util.Map getMetadataMap() { * * map<string, string> metadata = 2; */ + @java.lang.Override public java.lang.String getMetadataOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { @@ -1633,6 +1650,7 @@ public java.lang.String getMetadataOrDefault( * * map<string, string> metadata = 2; */ + @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationDatasetMetadata.java index c493623c0..d42298bd3 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationDatasetMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationDatasetMetadata.java @@ -125,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The enum numeric value on the wire for classificationType. */ + @java.lang.Override public int getClassificationTypeValue() { return classificationType_; } @@ -139,6 +140,7 @@ public int getClassificationTypeValue() { * * @return The classificationType. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationType getClassificationType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.ClassificationType result = @@ -482,6 +484,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for classificationType. */ + @java.lang.Override public int getClassificationTypeValue() { return classificationType_; } @@ -498,6 +501,7 @@ public int getClassificationTypeValue() { * @return This builder for chaining. */ public Builder setClassificationTypeValue(int value) { + classificationType_ = value; onChanged(); return this; @@ -513,6 +517,7 @@ public Builder setClassificationTypeValue(int value) { * * @return The classificationType. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationType getClassificationType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.ClassificationType result = diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationModelMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationModelMetadata.java index b50745b7a..b68b57f29 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationModelMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextClassificationModelMetadata.java @@ -125,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The enum numeric value on the wire for classificationType. */ + @java.lang.Override public int getClassificationTypeValue() { return classificationType_; } @@ -139,6 +140,7 @@ public int getClassificationTypeValue() { * * @return The classificationType. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationType getClassificationType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.ClassificationType result = @@ -480,6 +482,7 @@ public Builder mergeFrom( * * @return The enum numeric value on the wire for classificationType. */ + @java.lang.Override public int getClassificationTypeValue() { return classificationType_; } @@ -496,6 +499,7 @@ public int getClassificationTypeValue() { * @return This builder for chaining. */ public Builder setClassificationTypeValue(int value) { + classificationType_ = value; onChanged(); return this; @@ -511,6 +515,7 @@ public Builder setClassificationTypeValue(int value) { * * @return The classificationType. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationType getClassificationType() { @SuppressWarnings("deprecation") com.google.cloud.automl.v1.ClassificationType result = diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionAnnotation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionAnnotation.java index 609434317..12d908ef1 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionAnnotation.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionAnnotation.java @@ -180,6 +180,7 @@ public AnnotationCase getAnnotationCase() { * * @return Whether the textSegment field is set. */ + @java.lang.Override public boolean hasTextSegment() { return annotationCase_ == 3; } @@ -195,6 +196,7 @@ public boolean hasTextSegment() { * * @return The textSegment. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSegment getTextSegment() { if (annotationCase_ == 3) { return (com.google.cloud.automl.v1.TextSegment) annotation_; @@ -211,6 +213,7 @@ public com.google.cloud.automl.v1.TextSegment getTextSegment() { * * .google.cloud.automl.v1.TextSegment text_segment = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSegmentOrBuilder getTextSegmentOrBuilder() { if (annotationCase_ == 3) { return (com.google.cloud.automl.v1.TextSegment) annotation_; @@ -232,6 +235,7 @@ public com.google.cloud.automl.v1.TextSegmentOrBuilder getTextSegmentOrBuilder() * * @return The score. */ + @java.lang.Override public float getScore() { return score_; } @@ -630,6 +634,7 @@ public Builder clearAnnotation() { * * @return Whether the textSegment field is set. */ + @java.lang.Override public boolean hasTextSegment() { return annotationCase_ == 3; } @@ -645,6 +650,7 @@ public boolean hasTextSegment() { * * @return The textSegment. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSegment getTextSegment() { if (textSegmentBuilder_ == null) { if (annotationCase_ == 3) { @@ -782,6 +788,7 @@ public com.google.cloud.automl.v1.TextSegment.Builder getTextSegmentBuilder() { * * .google.cloud.automl.v1.TextSegment text_segment = 3; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSegmentOrBuilder getTextSegmentOrBuilder() { if ((annotationCase_ == 3) && (textSegmentBuilder_ != null)) { return textSegmentBuilder_.getMessageOrBuilder(); @@ -840,6 +847,7 @@ public com.google.cloud.automl.v1.TextSegmentOrBuilder getTextSegmentOrBuilder() * * @return The score. */ + @java.lang.Override public float getScore() { return score_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionEvaluationMetrics.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionEvaluationMetrics.java index 7c43d9737..0abc7644f 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextExtractionEvaluationMetrics.java @@ -312,6 +312,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The confidenceThreshold. */ + @java.lang.Override public float getConfidenceThreshold() { return confidenceThreshold_; } @@ -329,6 +330,7 @@ public float getConfidenceThreshold() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -346,6 +348,7 @@ public float getRecall() { * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -363,6 +366,7 @@ public float getPrecision() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -779,6 +783,7 @@ public Builder mergeFrom( * * @return The confidenceThreshold. */ + @java.lang.Override public float getConfidenceThreshold() { return confidenceThreshold_; } @@ -834,6 +839,7 @@ public Builder clearConfidenceThreshold() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -885,6 +891,7 @@ public Builder clearRecall() { * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -936,6 +943,7 @@ public Builder clearPrecision() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -1045,6 +1053,7 @@ public com.google.protobuf.Parser getParserForType() { * * @return The auPrc. */ + @java.lang.Override public float getAuPrc() { return auPrc_; } @@ -1065,6 +1074,7 @@ public float getAuPrc() { * repeated .google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; * */ + @java.lang.Override public java.util.List< com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry> getConfidenceMetricsEntriesList() { @@ -1082,6 +1092,7 @@ public float getAuPrc() { * repeated .google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; * */ + @java.lang.Override public java.util.List< ? extends com.google.cloud.automl.v1.TextExtractionEvaluationMetrics @@ -1101,6 +1112,7 @@ public float getAuPrc() { * repeated .google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; * */ + @java.lang.Override public int getConfidenceMetricsEntriesCount() { return confidenceMetricsEntries_.size(); } @@ -1116,6 +1128,7 @@ public int getConfidenceMetricsEntriesCount() { * repeated .google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry getConfidenceMetricsEntries(int index) { return confidenceMetricsEntries_.get(index); @@ -1132,6 +1145,7 @@ public int getConfidenceMetricsEntriesCount() { * repeated .google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; * */ + @java.lang.Override public com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntryOrBuilder getConfidenceMetricsEntriesOrBuilder(int index) { return confidenceMetricsEntries_.get(index); @@ -1530,6 +1544,7 @@ public Builder mergeFrom( * * @return The auPrc. */ + @java.lang.Override public float getAuPrc() { return auPrc_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSegment.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSegment.java index b4428f9bc..c3e279b35 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSegment.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSegment.java @@ -134,6 +134,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The content. */ + @java.lang.Override public java.lang.String getContent() { java.lang.Object ref = content_; if (ref instanceof java.lang.String) { @@ -156,6 +157,7 @@ public java.lang.String getContent() { * * @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) { @@ -182,6 +184,7 @@ public com.google.protobuf.ByteString getContentBytes() { * * @return The startOffset. */ + @java.lang.Override public long getStartOffset() { return startOffset_; } @@ -201,6 +204,7 @@ public long getStartOffset() { * * @return The endOffset. */ + @java.lang.Override public long getEndOffset() { return endOffset_; } @@ -669,6 +673,7 @@ public Builder setContentBytes(com.google.protobuf.ByteString value) { * * @return The startOffset. */ + @java.lang.Override public long getStartOffset() { return startOffset_; } @@ -724,6 +729,7 @@ public Builder clearStartOffset() { * * @return The endOffset. */ + @java.lang.Override public long getEndOffset() { return endOffset_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentAnnotation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentAnnotation.java index 9fcc26985..dca4ca663 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentAnnotation.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentAnnotation.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The sentiment. */ + @java.lang.Override public int getSentiment() { return sentiment_; } @@ -475,6 +476,7 @@ public Builder mergeFrom( * * @return The sentiment. */ + @java.lang.Override public int getSentiment() { return sentiment_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentDatasetMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentDatasetMetadata.java index 2785158b9..3d9ca71d1 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentDatasetMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentDatasetMetadata.java @@ -125,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The sentimentMax. */ + @java.lang.Override public int getSentimentMax() { return sentimentMax_; } @@ -464,6 +465,7 @@ public Builder mergeFrom( * * @return The sentimentMax. */ + @java.lang.Override public int getSentimentMax() { return sentimentMax_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentEvaluationMetrics.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentEvaluationMetrics.java index e6c89675d..9c10bafd0 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSentimentEvaluationMetrics.java @@ -170,6 +170,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -187,6 +188,7 @@ public float getPrecision() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -204,6 +206,7 @@ public float getRecall() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -222,6 +225,7 @@ public float getF1Score() { * * @return The meanAbsoluteError. */ + @java.lang.Override public float getMeanAbsoluteError() { return meanAbsoluteError_; } @@ -240,6 +244,7 @@ public float getMeanAbsoluteError() { * * @return The meanSquaredError. */ + @java.lang.Override public float getMeanSquaredError() { return meanSquaredError_; } @@ -258,6 +263,7 @@ public float getMeanSquaredError() { * * @return The linearKappa. */ + @java.lang.Override public float getLinearKappa() { return linearKappa_; } @@ -276,6 +282,7 @@ public float getLinearKappa() { * * @return The quadraticKappa. */ + @java.lang.Override public float getQuadraticKappa() { return quadraticKappa_; } @@ -298,6 +305,7 @@ public float getQuadraticKappa() { * * @return Whether the confusionMatrix field is set. */ + @java.lang.Override public boolean hasConfusionMatrix() { return confusionMatrix_ != null; } @@ -316,6 +324,7 @@ public boolean hasConfusionMatrix() { * * @return The confusionMatrix. */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix getConfusionMatrix() { return confusionMatrix_ == null @@ -336,6 +345,7 @@ public boolean hasConfusionMatrix() { * .google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; * */ + @java.lang.Override public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder getConfusionMatrixOrBuilder() { return getConfusionMatrix(); @@ -796,6 +806,7 @@ public Builder mergeFrom( * * @return The precision. */ + @java.lang.Override public float getPrecision() { return precision_; } @@ -847,6 +858,7 @@ public Builder clearPrecision() { * * @return The recall. */ + @java.lang.Override public float getRecall() { return recall_; } @@ -898,6 +910,7 @@ public Builder clearRecall() { * * @return The f1Score. */ + @java.lang.Override public float getF1Score() { return f1Score_; } @@ -950,6 +963,7 @@ public Builder clearF1Score() { * * @return The meanAbsoluteError. */ + @java.lang.Override public float getMeanAbsoluteError() { return meanAbsoluteError_; } @@ -1004,6 +1018,7 @@ public Builder clearMeanAbsoluteError() { * * @return The meanSquaredError. */ + @java.lang.Override public float getMeanSquaredError() { return meanSquaredError_; } @@ -1058,6 +1073,7 @@ public Builder clearMeanSquaredError() { * * @return The linearKappa. */ + @java.lang.Override public float getLinearKappa() { return linearKappa_; } @@ -1112,6 +1128,7 @@ public Builder clearLinearKappa() { * * @return The quadraticKappa. */ + @java.lang.Override public float getQuadraticKappa() { return quadraticKappa_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSnippet.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSnippet.java index 71c569fd1..205602de5 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSnippet.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TextSnippet.java @@ -141,6 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The content. */ + @java.lang.Override public java.lang.String getContent() { java.lang.Object ref = content_; if (ref instanceof java.lang.String) { @@ -164,6 +165,7 @@ public java.lang.String getContent() { * * @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) { @@ -191,6 +193,7 @@ public com.google.protobuf.ByteString getContentBytes() { * * @return The mimeType. */ + @java.lang.Override public java.lang.String getMimeType() { java.lang.Object ref = mimeType_; if (ref instanceof java.lang.String) { @@ -215,6 +218,7 @@ public java.lang.String getMimeType() { * * @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) { @@ -240,6 +244,7 @@ public com.google.protobuf.ByteString getMimeTypeBytes() { * * @return The contentUri. */ + @java.lang.Override public java.lang.String getContentUri() { java.lang.Object ref = contentUri_; if (ref instanceof java.lang.String) { @@ -262,6 +267,7 @@ public java.lang.String getContentUri() { * * @return The bytes for contentUri. */ + @java.lang.Override public com.google.protobuf.ByteString getContentUriBytes() { java.lang.Object ref = contentUri_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotation.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotation.java index 7ff31440b..b2ddf4ee3 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotation.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationAnnotation.java @@ -131,6 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the translatedContent field is set. */ + @java.lang.Override public boolean hasTranslatedContent() { return translatedContent_ != null; } @@ -145,6 +146,7 @@ public boolean hasTranslatedContent() { * * @return The translatedContent. */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippet getTranslatedContent() { return translatedContent_ == null ? com.google.cloud.automl.v1.TextSnippet.getDefaultInstance() @@ -159,6 +161,7 @@ public com.google.cloud.automl.v1.TextSnippet getTranslatedContent() { * * .google.cloud.automl.v1.TextSnippet translated_content = 1; */ + @java.lang.Override public com.google.cloud.automl.v1.TextSnippetOrBuilder getTranslatedContentOrBuilder() { return getTranslatedContent(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadata.java index 030c6f207..af320ece1 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationDatasetMetadata.java @@ -132,6 +132,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The sourceLanguageCode. */ + @java.lang.Override public java.lang.String getSourceLanguageCode() { java.lang.Object ref = sourceLanguageCode_; if (ref instanceof java.lang.String) { @@ -154,6 +155,7 @@ public java.lang.String getSourceLanguageCode() { * * @return The bytes for sourceLanguageCode. */ + @java.lang.Override public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { java.lang.Object ref = sourceLanguageCode_; if (ref instanceof java.lang.String) { @@ -179,6 +181,7 @@ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { * * @return The targetLanguageCode. */ + @java.lang.Override public java.lang.String getTargetLanguageCode() { java.lang.Object ref = targetLanguageCode_; if (ref instanceof java.lang.String) { @@ -201,6 +204,7 @@ public java.lang.String getTargetLanguageCode() { * * @return The bytes for targetLanguageCode. */ + @java.lang.Override public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { java.lang.Object ref = targetLanguageCode_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetrics.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetrics.java index 44800af93..71148b638 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetrics.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationEvaluationMetrics.java @@ -125,6 +125,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The bleuScore. */ + @java.lang.Override public double getBleuScore() { return bleuScore_; } @@ -142,6 +143,7 @@ public double getBleuScore() { * * @return The baseBleuScore. */ + @java.lang.Override public double getBaseBleuScore() { return baseBleuScore_; } @@ -499,6 +501,7 @@ public Builder mergeFrom( * * @return The bleuScore. */ + @java.lang.Override public double getBleuScore() { return bleuScore_; } @@ -550,6 +553,7 @@ public Builder clearBleuScore() { * * @return The baseBleuScore. */ + @java.lang.Override public double getBaseBleuScore() { return baseBleuScore_; } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadata.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadata.java index ae475c86a..6b78c0a11 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadata.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/TranslationModelMetadata.java @@ -143,6 +143,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The baseModel. */ + @java.lang.Override public java.lang.String getBaseModel() { java.lang.Object ref = baseModel_; if (ref instanceof java.lang.String) { @@ -168,6 +169,7 @@ public java.lang.String getBaseModel() { * * @return The bytes for baseModel. */ + @java.lang.Override public com.google.protobuf.ByteString getBaseModelBytes() { java.lang.Object ref = baseModel_; if (ref instanceof java.lang.String) { @@ -194,6 +196,7 @@ public com.google.protobuf.ByteString getBaseModelBytes() { * * @return The sourceLanguageCode. */ + @java.lang.Override public java.lang.String getSourceLanguageCode() { java.lang.Object ref = sourceLanguageCode_; if (ref instanceof java.lang.String) { @@ -217,6 +220,7 @@ public java.lang.String getSourceLanguageCode() { * * @return The bytes for sourceLanguageCode. */ + @java.lang.Override public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { java.lang.Object ref = sourceLanguageCode_; if (ref instanceof java.lang.String) { @@ -243,6 +247,7 @@ public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { * * @return The targetLanguageCode. */ + @java.lang.Override public java.lang.String getTargetLanguageCode() { java.lang.Object ref = targetLanguageCode_; if (ref instanceof java.lang.String) { @@ -266,6 +271,7 @@ public java.lang.String getTargetLanguageCode() { * * @return The bytes for targetLanguageCode. */ + @java.lang.Override public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { java.lang.Object ref = targetLanguageCode_; if (ref instanceof java.lang.String) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UndeployModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UndeployModelRequest.java index 1b85c40b3..415e05c46 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UndeployModelRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UndeployModelRequest.java @@ -126,6 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return The name. */ + @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { @@ -150,6 +151,7 @@ public java.lang.String getName() { * * @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) { diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateDatasetRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateDatasetRequest.java index 77141d443..a3d47a549 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateDatasetRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateDatasetRequest.java @@ -146,6 +146,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the dataset field is set. */ + @java.lang.Override public boolean hasDataset() { return dataset_ != null; } @@ -161,6 +162,7 @@ public boolean hasDataset() { * * @return The dataset. */ + @java.lang.Override public com.google.cloud.automl.v1.Dataset getDataset() { return dataset_ == null ? com.google.cloud.automl.v1.Dataset.getDefaultInstance() : dataset_; } @@ -174,6 +176,7 @@ public com.google.cloud.automl.v1.Dataset getDataset() { * .google.cloud.automl.v1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder() { return getDataset(); } @@ -192,6 +195,7 @@ public com.google.cloud.automl.v1.DatasetOrBuilder getDatasetOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -207,6 +211,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -220,6 +225,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } diff --git a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequest.java b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequest.java index bb49a4318..009a4feff 100644 --- a/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequest.java +++ b/proto-google-cloud-automl-v1/src/main/java/com/google/cloud/automl/v1/UpdateModelRequest.java @@ -145,6 +145,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * @return Whether the model field is set. */ + @java.lang.Override public boolean hasModel() { return model_ != null; } @@ -159,6 +160,7 @@ public boolean hasModel() { * * @return The model. */ + @java.lang.Override public com.google.cloud.automl.v1.Model getModel() { return model_ == null ? com.google.cloud.automl.v1.Model.getDefaultInstance() : model_; } @@ -171,6 +173,7 @@ public com.google.cloud.automl.v1.Model getModel() { * * .google.cloud.automl.v1.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; */ + @java.lang.Override public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder() { return getModel(); } @@ -189,6 +192,7 @@ public com.google.cloud.automl.v1.ModelOrBuilder getModelOrBuilder() { * * @return Whether the updateMask field is set. */ + @java.lang.Override public boolean hasUpdateMask() { return updateMask_ != null; } @@ -204,6 +208,7 @@ public boolean hasUpdateMask() { * * @return The updateMask. */ + @java.lang.Override public com.google.protobuf.FieldMask getUpdateMask() { return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; } @@ -217,6 +222,7 @@ public com.google.protobuf.FieldMask getUpdateMask() { * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; * */ + @java.lang.Override public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { return getUpdateMask(); } diff --git a/proto-google-cloud-automl-v1beta1/clirr-ignored-differences.xml b/proto-google-cloud-automl-v1beta1/clirr-ignored-differences.xml deleted file mode 100644 index b752d65fc..000000000 --- a/proto-google-cloud-automl-v1beta1/clirr-ignored-differences.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - 7012 - com/google/cloud/automl/v1beta1/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/automl/v1beta1/*OrBuilder - boolean contains*(*) - - diff --git a/proto-google-cloud-automl-v1beta1/pom.xml b/proto-google-cloud-automl-v1beta1/pom.xml deleted file mode 100644 index bf7e53b0c..000000000 --- a/proto-google-cloud-automl-v1beta1/pom.xml +++ /dev/null @@ -1,33 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-automl-v1beta1 - 0.82.3-SNAPSHOT - proto-google-cloud-automl-v1beta1 - PROTO library for proto-google-cloud-automl-v1beta1 - - com.google.cloud - google-cloud-automl-parent - 1.1.3-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api - api-common - - - com.google.guava - guava - - - \ No newline at end of file diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayload.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayload.java deleted file mode 100644 index 9e6d46a06..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayload.java +++ /dev/null @@ -1,3542 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/annotation_payload.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Contains annotation information that is relevant to AutoML.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.AnnotationPayload} - */ -public final class AnnotationPayload extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.AnnotationPayload) - AnnotationPayloadOrBuilder { - private static final long serialVersionUID = 0L; - // Use AnnotationPayload.newBuilder() to construct. - private AnnotationPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AnnotationPayload() { - annotationSpecId_ = ""; - displayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AnnotationPayload(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AnnotationPayload( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - annotationSpecId_ = s; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder subBuilder = null; - if (detailCase_ == 2) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_).toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TranslationAnnotation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 2; - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - subBuilder = null; - if (detailCase_ == 3) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - detail_) - .toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 3; - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder subBuilder = - null; - if (detailCase_ == 4) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_) - .toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 4; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 50: - { - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder subBuilder = null; - if (detailCase_ == 6) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_) - .toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 6; - break; - } - case 58: - { - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder - subBuilder = null; - if (detailCase_ == 7) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) - detail_) - .toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) - detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 7; - break; - } - case 66: - { - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder subBuilder = - null; - if (detailCase_ == 8) { - subBuilder = - ((com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_) - .toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 8; - break; - } - case 74: - { - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .Builder - subBuilder = null; - if (detailCase_ == 9) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotation) - detail_) - .toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotation) - detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 9; - break; - } - case 82: - { - com.google.cloud.automl.v1beta1.TablesAnnotation.Builder subBuilder = null; - if (detailCase_ == 10) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TablesAnnotation) detail_).toBuilder(); - } - detail_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TablesAnnotation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.TablesAnnotation) detail_); - detail_ = subBuilder.buildPartial(); - } - detailCase_ = 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.automl.v1beta1.AnnotationPayloadOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.AnnotationPayload.class, - com.google.cloud.automl.v1beta1.AnnotationPayload.Builder.class); - } - - private int detailCase_ = 0; - private java.lang.Object detail_; - - public enum DetailCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TRANSLATION(2), - CLASSIFICATION(3), - IMAGE_OBJECT_DETECTION(4), - VIDEO_CLASSIFICATION(9), - VIDEO_OBJECT_TRACKING(8), - TEXT_EXTRACTION(6), - TEXT_SENTIMENT(7), - TABLES(10), - DETAIL_NOT_SET(0); - private final int value; - - private DetailCase(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 DetailCase valueOf(int value) { - return forNumber(value); - } - - public static DetailCase forNumber(int value) { - switch (value) { - case 2: - return TRANSLATION; - case 3: - return CLASSIFICATION; - case 4: - return IMAGE_OBJECT_DETECTION; - case 9: - return VIDEO_CLASSIFICATION; - case 8: - return VIDEO_OBJECT_TRACKING; - case 6: - return TEXT_EXTRACTION; - case 7: - return TEXT_SENTIMENT; - case 10: - return TABLES; - case 0: - return DETAIL_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DetailCase getDetailCase() { - return DetailCase.forNumber(detailCase_); - } - - public static final int TRANSLATION_FIELD_NUMBER = 2; - /** - * - * - *
-   * Annotation details for translation.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - * - * @return Whether the translation field is set. - */ - public boolean hasTranslation() { - return detailCase_ == 2; - } - /** - * - * - *
-   * Annotation details for translation.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - * - * @return The translation. - */ - public com.google.cloud.automl.v1beta1.TranslationAnnotation getTranslation() { - if (detailCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for translation.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - public com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder getTranslationOrBuilder() { - if (detailCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); - } - - public static final int CLASSIFICATION_FIELD_NUMBER = 3; - /** - * - * - *
-   * Annotation details for content or image classification.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - * - * @return Whether the classification field is set. - */ - public boolean hasClassification() { - return detailCase_ == 3; - } - /** - * - * - *
-   * Annotation details for content or image classification.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - * - * @return The classification. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getClassification() { - if (detailCase_ == 3) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for content or image classification.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder - getClassificationOrBuilder() { - if (detailCase_ == 3) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance(); - } - - public static final int IMAGE_OBJECT_DETECTION_FIELD_NUMBER = 4; - /** - * - * - *
-   * Annotation details for image object detection.
-   * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - * - * @return Whether the imageObjectDetection field is set. - */ - public boolean hasImageObjectDetection() { - return detailCase_ == 4; - } - /** - * - * - *
-   * Annotation details for image object detection.
-   * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - * - * @return The imageObjectDetection. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation getImageObjectDetection() { - if (detailCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for image object detection.
-   * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder - getImageObjectDetectionOrBuilder() { - if (detailCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); - } - - public static final int VIDEO_CLASSIFICATION_FIELD_NUMBER = 9; - /** - * - * - *
-   * Annotation details for video classification.
-   * Returned for Video Classification predictions.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - * - * @return Whether the videoClassification field is set. - */ - public boolean hasVideoClassification() { - return detailCase_ == 9; - } - /** - * - * - *
-   * Annotation details for video classification.
-   * Returned for Video Classification predictions.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - * - * @return The videoClassification. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - getVideoClassification() { - if (detailCase_ == 9) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for video classification.
-   * Returned for Video Classification predictions.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotationOrBuilder - getVideoClassificationOrBuilder() { - if (detailCase_ == 9) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance(); - } - - public static final int VIDEO_OBJECT_TRACKING_FIELD_NUMBER = 8; - /** - * - * - *
-   * Annotation details for video object tracking.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - * - * @return Whether the videoObjectTracking field is set. - */ - public boolean hasVideoObjectTracking() { - return detailCase_ == 8; - } - /** - * - * - *
-   * Annotation details for video object tracking.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - * - * @return The videoObjectTracking. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation getVideoObjectTracking() { - if (detailCase_ == 8) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for video object tracking.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder - getVideoObjectTrackingOrBuilder() { - if (detailCase_ == 8) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); - } - - public static final int TEXT_EXTRACTION_FIELD_NUMBER = 6; - /** - * - * - *
-   * Annotation details for text extraction.
-   * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - * - * @return Whether the textExtraction field is set. - */ - public boolean hasTextExtraction() { - return detailCase_ == 6; - } - /** - * - * - *
-   * Annotation details for text extraction.
-   * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - * - * @return The textExtraction. - */ - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation getTextExtraction() { - if (detailCase_ == 6) { - return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for text extraction.
-   * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - public com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder - getTextExtractionOrBuilder() { - if (detailCase_ == 6) { - return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); - } - - public static final int TEXT_SENTIMENT_FIELD_NUMBER = 7; - /** - * - * - *
-   * Annotation details for text sentiment.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - * - * @return Whether the textSentiment field is set. - */ - public boolean hasTextSentiment() { - return detailCase_ == 7; - } - /** - * - * - *
-   * Annotation details for text sentiment.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - * - * @return The textSentiment. - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - getTextSentiment() { - if (detailCase_ == 7) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for text sentiment.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder - getTextSentimentOrBuilder() { - if (detailCase_ == 7) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance(); - } - - public static final int TABLES_FIELD_NUMBER = 10; - /** - * - * - *
-   * Annotation details for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - * - * @return Whether the tables field is set. - */ - public boolean hasTables() { - return detailCase_ == 10; - } - /** - * - * - *
-   * Annotation details for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - * - * @return The tables. - */ - public com.google.cloud.automl.v1beta1.TablesAnnotation getTables() { - if (detailCase_ == 10) { - return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); - } - /** - * - * - *
-   * Annotation details for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - public com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder getTablesOrBuilder() { - if (detailCase_ == 10) { - return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); - } - - public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object annotationSpecId_; - /** - * - * - *
-   * Output only . The resource ID of the annotation spec that
-   * this annotation pertains to. The annotation spec comes from either an
-   * ancestor dataset, or the dataset that was used to train the model in use.
-   * 
- * - * string annotation_spec_id = 1; - * - * @return The annotationSpecId. - */ - public java.lang.String getAnnotationSpecId() { - java.lang.Object ref = annotationSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - annotationSpecId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only . The resource ID of the annotation spec that
-   * this annotation pertains to. The annotation spec comes from either an
-   * ancestor dataset, or the dataset that was used to train the model in use.
-   * 
- * - * string annotation_spec_id = 1; - * - * @return The bytes for annotationSpecId. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { - java.lang.Object ref = annotationSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - annotationSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-   * when the model was trained. Because this field returns a value at model
-   * training time, for different models trained using the same dataset, the
-   * returned value could be different as model owner could update the
-   * `display_name` between any two model training.
-   * 
- * - * string display_name = 5; - * - * @return The displayName. - */ - 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; - } - } - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-   * when the model was trained. Because this field returns a value at model
-   * training time, for different models trained using the same dataset, the
-   * returned value could be different as model owner could update the
-   * `display_name` between any two model training.
-   * 
- * - * string display_name = 5; - * - * @return The bytes for displayName. - */ - 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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getAnnotationSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecId_); - } - if (detailCase_ == 2) { - output.writeMessage(2, (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_); - } - if (detailCase_ == 3) { - output.writeMessage( - 3, - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_); - } - if (detailCase_ == 4) { - output.writeMessage( - 4, (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); - } - if (detailCase_ == 6) { - output.writeMessage(6, (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_); - } - if (detailCase_ == 7) { - output.writeMessage( - 7, (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_); - } - if (detailCase_ == 8) { - output.writeMessage( - 8, (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_); - } - if (detailCase_ == 9) { - output.writeMessage( - 9, - (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - detail_); - } - if (detailCase_ == 10) { - output.writeMessage(10, (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getAnnotationSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecId_); - } - if (detailCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_); - } - if (detailCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - detail_); - } - if (detailCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); - } - if (detailCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_); - } - if (detailCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_); - } - if (detailCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_); - } - if (detailCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, - (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - detail_); - } - if (detailCase_ == 10) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.AnnotationPayload)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.AnnotationPayload other = - (com.google.cloud.automl.v1beta1.AnnotationPayload) obj; - - if (!getAnnotationSpecId().equals(other.getAnnotationSpecId())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDetailCase().equals(other.getDetailCase())) return false; - switch (detailCase_) { - case 2: - if (!getTranslation().equals(other.getTranslation())) return false; - break; - case 3: - if (!getClassification().equals(other.getClassification())) return false; - break; - case 4: - if (!getImageObjectDetection().equals(other.getImageObjectDetection())) return false; - break; - case 9: - if (!getVideoClassification().equals(other.getVideoClassification())) return false; - break; - case 8: - if (!getVideoObjectTracking().equals(other.getVideoObjectTracking())) return false; - break; - case 6: - if (!getTextExtraction().equals(other.getTextExtraction())) return false; - break; - case 7: - if (!getTextSentiment().equals(other.getTextSentiment())) return false; - break; - case 10: - if (!getTables().equals(other.getTables())) 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) + ANNOTATION_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getAnnotationSpecId().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - switch (detailCase_) { - case 2: - hash = (37 * hash) + TRANSLATION_FIELD_NUMBER; - hash = (53 * hash) + getTranslation().hashCode(); - break; - case 3: - hash = (37 * hash) + CLASSIFICATION_FIELD_NUMBER; - hash = (53 * hash) + getClassification().hashCode(); - break; - case 4: - hash = (37 * hash) + IMAGE_OBJECT_DETECTION_FIELD_NUMBER; - hash = (53 * hash) + getImageObjectDetection().hashCode(); - break; - case 9: - hash = (37 * hash) + VIDEO_CLASSIFICATION_FIELD_NUMBER; - hash = (53 * hash) + getVideoClassification().hashCode(); - break; - case 8: - hash = (37 * hash) + VIDEO_OBJECT_TRACKING_FIELD_NUMBER; - hash = (53 * hash) + getVideoObjectTracking().hashCode(); - break; - case 6: - hash = (37 * hash) + TEXT_EXTRACTION_FIELD_NUMBER; - hash = (53 * hash) + getTextExtraction().hashCode(); - break; - case 7: - hash = (37 * hash) + TEXT_SENTIMENT_FIELD_NUMBER; - hash = (53 * hash) + getTextSentiment().hashCode(); - break; - case 10: - hash = (37 * hash) + TABLES_FIELD_NUMBER; - hash = (53 * hash) + getTables().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.AnnotationPayload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Contains annotation information that is relevant to AutoML.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.AnnotationPayload} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.AnnotationPayload) - com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.AnnotationPayload.class, - com.google.cloud.automl.v1beta1.AnnotationPayload.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.AnnotationPayload.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - annotationSpecId_ = ""; - - displayName_ = ""; - - detailCase_ = 0; - detail_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.AnnotationPayload getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.AnnotationPayload.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.AnnotationPayload build() { - com.google.cloud.automl.v1beta1.AnnotationPayload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.AnnotationPayload buildPartial() { - com.google.cloud.automl.v1beta1.AnnotationPayload result = - new com.google.cloud.automl.v1beta1.AnnotationPayload(this); - if (detailCase_ == 2) { - if (translationBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = translationBuilder_.build(); - } - } - if (detailCase_ == 3) { - if (classificationBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = classificationBuilder_.build(); - } - } - if (detailCase_ == 4) { - if (imageObjectDetectionBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = imageObjectDetectionBuilder_.build(); - } - } - if (detailCase_ == 9) { - if (videoClassificationBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = videoClassificationBuilder_.build(); - } - } - if (detailCase_ == 8) { - if (videoObjectTrackingBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = videoObjectTrackingBuilder_.build(); - } - } - if (detailCase_ == 6) { - if (textExtractionBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = textExtractionBuilder_.build(); - } - } - if (detailCase_ == 7) { - if (textSentimentBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = textSentimentBuilder_.build(); - } - } - if (detailCase_ == 10) { - if (tablesBuilder_ == null) { - result.detail_ = detail_; - } else { - result.detail_ = tablesBuilder_.build(); - } - } - result.annotationSpecId_ = annotationSpecId_; - result.displayName_ = displayName_; - result.detailCase_ = detailCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.AnnotationPayload) { - return mergeFrom((com.google.cloud.automl.v1beta1.AnnotationPayload) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.AnnotationPayload other) { - if (other == com.google.cloud.automl.v1beta1.AnnotationPayload.getDefaultInstance()) - return this; - if (!other.getAnnotationSpecId().isEmpty()) { - annotationSpecId_ = other.annotationSpecId_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - switch (other.getDetailCase()) { - case TRANSLATION: - { - mergeTranslation(other.getTranslation()); - break; - } - case CLASSIFICATION: - { - mergeClassification(other.getClassification()); - break; - } - case IMAGE_OBJECT_DETECTION: - { - mergeImageObjectDetection(other.getImageObjectDetection()); - break; - } - case VIDEO_CLASSIFICATION: - { - mergeVideoClassification(other.getVideoClassification()); - break; - } - case VIDEO_OBJECT_TRACKING: - { - mergeVideoObjectTracking(other.getVideoObjectTracking()); - break; - } - case TEXT_EXTRACTION: - { - mergeTextExtraction(other.getTextExtraction()); - break; - } - case TEXT_SENTIMENT: - { - mergeTextSentiment(other.getTextSentiment()); - break; - } - case TABLES: - { - mergeTables(other.getTables()); - break; - } - case DETAIL_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.AnnotationPayload parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.AnnotationPayload) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int detailCase_ = 0; - private java.lang.Object detail_; - - public DetailCase getDetailCase() { - return DetailCase.forNumber(detailCase_); - } - - public Builder clearDetail() { - detailCase_ = 0; - detail_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationAnnotation, - com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder, - com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder> - translationBuilder_; - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - * - * @return Whether the translation field is set. - */ - public boolean hasTranslation() { - return detailCase_ == 2; - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - * - * @return The translation. - */ - public com.google.cloud.automl.v1beta1.TranslationAnnotation getTranslation() { - if (translationBuilder_ == null) { - if (detailCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); - } else { - if (detailCase_ == 2) { - return translationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - public Builder setTranslation(com.google.cloud.automl.v1beta1.TranslationAnnotation value) { - if (translationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - translationBuilder_.setMessage(value); - } - detailCase_ = 2; - return this; - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - public Builder setTranslation( - com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder builderForValue) { - if (translationBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - translationBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 2; - return this; - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - public Builder mergeTranslation(com.google.cloud.automl.v1beta1.TranslationAnnotation value) { - if (translationBuilder_ == null) { - if (detailCase_ == 2 - && detail_ - != com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.TranslationAnnotation.newBuilder( - (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 2) { - translationBuilder_.mergeFrom(value); - } - translationBuilder_.setMessage(value); - } - detailCase_ = 2; - return this; - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - public Builder clearTranslation() { - if (translationBuilder_ == null) { - if (detailCase_ == 2) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 2) { - detailCase_ = 0; - detail_ = null; - } - translationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - public com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder getTranslationBuilder() { - return getTranslationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - public com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder - getTranslationOrBuilder() { - if ((detailCase_ == 2) && (translationBuilder_ != null)) { - return translationBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for translation.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationAnnotation, - com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder, - com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder> - getTranslationFieldBuilder() { - if (translationBuilder_ == null) { - if (!(detailCase_ == 2)) { - detail_ = com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); - } - translationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationAnnotation, - com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder, - com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 2; - onChanged(); - ; - return translationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder> - classificationBuilder_; - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - * - * @return Whether the classification field is set. - */ - public boolean hasClassification() { - return detailCase_ == 3; - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - * - * @return The classification. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getClassification() { - if (classificationBuilder_ == null) { - if (detailCase_ == 3) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance(); - } else { - if (detailCase_ == 3) { - return classificationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - public Builder setClassification( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation value) { - if (classificationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - classificationBuilder_.setMessage(value); - } - detailCase_ = 3; - return this; - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - public Builder setClassification( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - builderForValue) { - if (classificationBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - classificationBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 3; - return this; - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - public Builder mergeClassification( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation value) { - if (classificationBuilder_ == null) { - if (detailCase_ == 3 - && detail_ - != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .newBuilder( - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 3) { - classificationBuilder_.mergeFrom(value); - } - classificationBuilder_.setMessage(value); - } - detailCase_ = 3; - return this; - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - public Builder clearClassification() { - if (classificationBuilder_ == null) { - if (detailCase_ == 3) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 3) { - detailCase_ = 0; - detail_ = null; - } - classificationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - getClassificationBuilder() { - return getClassificationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder - getClassificationOrBuilder() { - if ((detailCase_ == 3) && (classificationBuilder_ != null)) { - return classificationBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 3) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for content or image classification.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder> - getClassificationFieldBuilder() { - if (classificationBuilder_ == null) { - if (!(detailCase_ == 3)) { - detail_ = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance(); - } - classificationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 3; - onChanged(); - ; - return classificationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder> - imageObjectDetectionBuilder_; - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - * - * @return Whether the imageObjectDetection field is set. - */ - public boolean hasImageObjectDetection() { - return detailCase_ == 4; - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - * - * @return The imageObjectDetection. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation - getImageObjectDetection() { - if (imageObjectDetectionBuilder_ == null) { - if (detailCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); - } else { - if (detailCase_ == 4) { - return imageObjectDetectionBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - public Builder setImageObjectDetection( - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation value) { - if (imageObjectDetectionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - imageObjectDetectionBuilder_.setMessage(value); - } - detailCase_ = 4; - return this; - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - public Builder setImageObjectDetection( - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder builderForValue) { - if (imageObjectDetectionBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - imageObjectDetectionBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 4; - return this; - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - public Builder mergeImageObjectDetection( - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation value) { - if (imageObjectDetectionBuilder_ == null) { - if (detailCase_ == 4 - && detail_ - != com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation - .getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.newBuilder( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 4) { - imageObjectDetectionBuilder_.mergeFrom(value); - } - imageObjectDetectionBuilder_.setMessage(value); - } - detailCase_ = 4; - return this; - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - public Builder clearImageObjectDetection() { - if (imageObjectDetectionBuilder_ == null) { - if (detailCase_ == 4) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 4) { - detailCase_ = 0; - detail_ = null; - } - imageObjectDetectionBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder - getImageObjectDetectionBuilder() { - return getImageObjectDetectionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder - getImageObjectDetectionOrBuilder() { - if ((detailCase_ == 4) && (imageObjectDetectionBuilder_ != null)) { - return imageObjectDetectionBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for image object detection.
-     * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder> - getImageObjectDetectionFieldBuilder() { - if (imageObjectDetectionBuilder_ == null) { - if (!(detailCase_ == 4)) { - detail_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); - } - imageObjectDetectionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 4; - onChanged(); - ; - return imageObjectDetectionBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotationOrBuilder> - videoClassificationBuilder_; - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - * - * @return Whether the videoClassification field is set. - */ - public boolean hasVideoClassification() { - return detailCase_ == 9; - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - * - * @return The videoClassification. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - getVideoClassification() { - if (videoClassificationBuilder_ == null) { - if (detailCase_ == 9) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance(); - } else { - if (detailCase_ == 9) { - return videoClassificationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - public Builder setVideoClassification( - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation value) { - if (videoClassificationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - videoClassificationBuilder_.setMessage(value); - } - detailCase_ = 9; - return this; - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - public Builder setVideoClassification( - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation.Builder - builderForValue) { - if (videoClassificationBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - videoClassificationBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 9; - return this; - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - public Builder mergeVideoClassification( - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation value) { - if (videoClassificationBuilder_ == null) { - if (detailCase_ == 9 - && detail_ - != com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .newBuilder( - (com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotation) - detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 9) { - videoClassificationBuilder_.mergeFrom(value); - } - videoClassificationBuilder_.setMessage(value); - } - detailCase_ = 9; - return this; - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - public Builder clearVideoClassification() { - if (videoClassificationBuilder_ == null) { - if (detailCase_ == 9) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 9) { - detailCase_ = 0; - detail_ = null; - } - videoClassificationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation.Builder - getVideoClassificationBuilder() { - return getVideoClassificationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotationOrBuilder - getVideoClassificationOrBuilder() { - if ((detailCase_ == 9) && (videoClassificationBuilder_ != null)) { - return videoClassificationBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 9) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for video classification.
-     * Returned for Video Classification predictions.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotationOrBuilder> - getVideoClassificationFieldBuilder() { - if (videoClassificationBuilder_ == null) { - if (!(detailCase_ == 9)) { - detail_ = - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance(); - } - videoClassificationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 9; - onChanged(); - ; - return videoClassificationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder> - videoObjectTrackingBuilder_; - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - * - * @return Whether the videoObjectTracking field is set. - */ - public boolean hasVideoObjectTracking() { - return detailCase_ == 8; - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - * - * @return The videoObjectTracking. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation getVideoObjectTracking() { - if (videoObjectTrackingBuilder_ == null) { - if (detailCase_ == 8) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); - } else { - if (detailCase_ == 8) { - return videoObjectTrackingBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - public Builder setVideoObjectTracking( - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation value) { - if (videoObjectTrackingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - videoObjectTrackingBuilder_.setMessage(value); - } - detailCase_ = 8; - return this; - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - public Builder setVideoObjectTracking( - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder builderForValue) { - if (videoObjectTrackingBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - videoObjectTrackingBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 8; - return this; - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - public Builder mergeVideoObjectTracking( - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation value) { - if (videoObjectTrackingBuilder_ == null) { - if (detailCase_ == 8 - && detail_ - != com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation - .getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.newBuilder( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 8) { - videoObjectTrackingBuilder_.mergeFrom(value); - } - videoObjectTrackingBuilder_.setMessage(value); - } - detailCase_ = 8; - return this; - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - public Builder clearVideoObjectTracking() { - if (videoObjectTrackingBuilder_ == null) { - if (detailCase_ == 8) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 8) { - detailCase_ = 0; - detail_ = null; - } - videoObjectTrackingBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder - getVideoObjectTrackingBuilder() { - return getVideoObjectTrackingFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder - getVideoObjectTrackingOrBuilder() { - if ((detailCase_ == 8) && (videoObjectTrackingBuilder_ != null)) { - return videoObjectTrackingBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 8) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for video object tracking.
-     * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder> - getVideoObjectTrackingFieldBuilder() { - if (videoObjectTrackingBuilder_ == null) { - if (!(detailCase_ == 8)) { - detail_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); - } - videoObjectTrackingBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 8; - onChanged(); - ; - return videoObjectTrackingBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionAnnotation, - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder, - com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder> - textExtractionBuilder_; - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - * - * @return Whether the textExtraction field is set. - */ - public boolean hasTextExtraction() { - return detailCase_ == 6; - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - * - * @return The textExtraction. - */ - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation getTextExtraction() { - if (textExtractionBuilder_ == null) { - if (detailCase_ == 6) { - return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); - } else { - if (detailCase_ == 6) { - return textExtractionBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - public Builder setTextExtraction( - com.google.cloud.automl.v1beta1.TextExtractionAnnotation value) { - if (textExtractionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - textExtractionBuilder_.setMessage(value); - } - detailCase_ = 6; - return this; - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - public Builder setTextExtraction( - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder builderForValue) { - if (textExtractionBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - textExtractionBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 6; - return this; - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - public Builder mergeTextExtraction( - com.google.cloud.automl.v1beta1.TextExtractionAnnotation value) { - if (textExtractionBuilder_ == null) { - if (detailCase_ == 6 - && detail_ - != com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.newBuilder( - (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 6) { - textExtractionBuilder_.mergeFrom(value); - } - textExtractionBuilder_.setMessage(value); - } - detailCase_ = 6; - return this; - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - public Builder clearTextExtraction() { - if (textExtractionBuilder_ == null) { - if (detailCase_ == 6) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 6) { - detailCase_ = 0; - detail_ = null; - } - textExtractionBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder - getTextExtractionBuilder() { - return getTextExtractionFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - public com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder - getTextExtractionOrBuilder() { - if ((detailCase_ == 6) && (textExtractionBuilder_ != null)) { - return textExtractionBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 6) { - return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for text extraction.
-     * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionAnnotation, - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder, - com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder> - getTextExtractionFieldBuilder() { - if (textExtractionBuilder_ == null) { - if (!(detailCase_ == 6)) { - detail_ = com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); - } - textExtractionBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionAnnotation, - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder, - com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 6; - onChanged(); - ; - return textExtractionBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder> - textSentimentBuilder_; - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - * - * @return Whether the textSentiment field is set. - */ - public boolean hasTextSentiment() { - return detailCase_ == 7; - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - * - * @return The textSentiment. - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - getTextSentiment() { - if (textSentimentBuilder_ == null) { - if (detailCase_ == 7) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance(); - } else { - if (detailCase_ == 7) { - return textSentimentBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - public Builder setTextSentiment( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation value) { - if (textSentimentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - textSentimentBuilder_.setMessage(value); - } - detailCase_ = 7; - return this; - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - public Builder setTextSentiment( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder - builderForValue) { - if (textSentimentBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - textSentimentBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 7; - return this; - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - public Builder mergeTextSentiment( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation value) { - if (textSentimentBuilder_ == null) { - if (detailCase_ == 7 - && detail_ - != com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.newBuilder( - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) - detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 7) { - textSentimentBuilder_.mergeFrom(value); - } - textSentimentBuilder_.setMessage(value); - } - detailCase_ = 7; - return this; - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - public Builder clearTextSentiment() { - if (textSentimentBuilder_ == null) { - if (detailCase_ == 7) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 7) { - detailCase_ = 0; - detail_ = null; - } - textSentimentBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder - getTextSentimentBuilder() { - return getTextSentimentFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder - getTextSentimentOrBuilder() { - if ((detailCase_ == 7) && (textSentimentBuilder_ != null)) { - return textSentimentBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 7) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) - detail_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for text sentiment.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder> - getTextSentimentFieldBuilder() { - if (textSentimentBuilder_ == null) { - if (!(detailCase_ == 7)) { - detail_ = - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance(); - } - textSentimentBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder, - com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) - detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 7; - onChanged(); - ; - return textSentimentBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesAnnotation, - com.google.cloud.automl.v1beta1.TablesAnnotation.Builder, - com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder> - tablesBuilder_; - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - * - * @return Whether the tables field is set. - */ - public boolean hasTables() { - return detailCase_ == 10; - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - * - * @return The tables. - */ - public com.google.cloud.automl.v1beta1.TablesAnnotation getTables() { - if (tablesBuilder_ == null) { - if (detailCase_ == 10) { - return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); - } else { - if (detailCase_ == 10) { - return tablesBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - public Builder setTables(com.google.cloud.automl.v1beta1.TablesAnnotation value) { - if (tablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - detail_ = value; - onChanged(); - } else { - tablesBuilder_.setMessage(value); - } - detailCase_ = 10; - return this; - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - public Builder setTables( - com.google.cloud.automl.v1beta1.TablesAnnotation.Builder builderForValue) { - if (tablesBuilder_ == null) { - detail_ = builderForValue.build(); - onChanged(); - } else { - tablesBuilder_.setMessage(builderForValue.build()); - } - detailCase_ = 10; - return this; - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - public Builder mergeTables(com.google.cloud.automl.v1beta1.TablesAnnotation value) { - if (tablesBuilder_ == null) { - if (detailCase_ == 10 - && detail_ != com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance()) { - detail_ = - com.google.cloud.automl.v1beta1.TablesAnnotation.newBuilder( - (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_) - .mergeFrom(value) - .buildPartial(); - } else { - detail_ = value; - } - onChanged(); - } else { - if (detailCase_ == 10) { - tablesBuilder_.mergeFrom(value); - } - tablesBuilder_.setMessage(value); - } - detailCase_ = 10; - return this; - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - public Builder clearTables() { - if (tablesBuilder_ == null) { - if (detailCase_ == 10) { - detailCase_ = 0; - detail_ = null; - onChanged(); - } - } else { - if (detailCase_ == 10) { - detailCase_ = 0; - detail_ = null; - } - tablesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - public com.google.cloud.automl.v1beta1.TablesAnnotation.Builder getTablesBuilder() { - return getTablesFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - public com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder getTablesOrBuilder() { - if ((detailCase_ == 10) && (tablesBuilder_ != null)) { - return tablesBuilder_.getMessageOrBuilder(); - } else { - if (detailCase_ == 10) { - return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; - } - return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); - } - } - /** - * - * - *
-     * Annotation details for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesAnnotation, - com.google.cloud.automl.v1beta1.TablesAnnotation.Builder, - com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder> - getTablesFieldBuilder() { - if (tablesBuilder_ == null) { - if (!(detailCase_ == 10)) { - detail_ = com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); - } - tablesBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesAnnotation, - com.google.cloud.automl.v1beta1.TablesAnnotation.Builder, - com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder>( - (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_, - getParentForChildren(), - isClean()); - detail_ = null; - } - detailCase_ = 10; - onChanged(); - ; - return tablesBuilder_; - } - - private java.lang.Object annotationSpecId_ = ""; - /** - * - * - *
-     * Output only . The resource ID of the annotation spec that
-     * this annotation pertains to. The annotation spec comes from either an
-     * ancestor dataset, or the dataset that was used to train the model in use.
-     * 
- * - * string annotation_spec_id = 1; - * - * @return The annotationSpecId. - */ - public java.lang.String getAnnotationSpecId() { - java.lang.Object ref = annotationSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - annotationSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only . The resource ID of the annotation spec that
-     * this annotation pertains to. The annotation spec comes from either an
-     * ancestor dataset, or the dataset that was used to train the model in use.
-     * 
- * - * string annotation_spec_id = 1; - * - * @return The bytes for annotationSpecId. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { - java.lang.Object ref = annotationSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - annotationSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only . The resource ID of the annotation spec that
-     * this annotation pertains to. The annotation spec comes from either an
-     * ancestor dataset, or the dataset that was used to train the model in use.
-     * 
- * - * string annotation_spec_id = 1; - * - * @param value The annotationSpecId to set. - * @return This builder for chaining. - */ - public Builder setAnnotationSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - annotationSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only . The resource ID of the annotation spec that
-     * this annotation pertains to. The annotation spec comes from either an
-     * ancestor dataset, or the dataset that was used to train the model in use.
-     * 
- * - * string annotation_spec_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearAnnotationSpecId() { - - annotationSpecId_ = getDefaultInstance().getAnnotationSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only . The resource ID of the annotation spec that
-     * this annotation pertains to. The annotation spec comes from either an
-     * ancestor dataset, or the dataset that was used to train the model in use.
-     * 
- * - * string annotation_spec_id = 1; - * - * @param value The bytes for annotationSpecId to set. - * @return This builder for chaining. - */ - public Builder setAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - annotationSpecId_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-     * when the model was trained. Because this field returns a value at model
-     * training time, for different models trained using the same dataset, the
-     * returned value could be different as model owner could update the
-     * `display_name` between any two model training.
-     * 
- * - * string display_name = 5; - * - * @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; - } - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-     * when the model was trained. Because this field returns a value at model
-     * training time, for different models trained using the same dataset, the
-     * returned value could be different as model owner could update the
-     * `display_name` between any two model training.
-     * 
- * - * string display_name = 5; - * - * @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; - } - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-     * when the model was trained. Because this field returns a value at model
-     * training time, for different models trained using the same dataset, the
-     * returned value could be different as model owner could update the
-     * `display_name` between any two model training.
-     * 
- * - * string display_name = 5; - * - * @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; - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-     * when the model was trained. Because this field returns a value at model
-     * training time, for different models trained using the same dataset, the
-     * returned value could be different as model owner could update the
-     * `display_name` between any two model training.
-     * 
- * - * string display_name = 5; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-     * when the model was trained. Because this field returns a value at model
-     * training time, for different models trained using the same dataset, the
-     * returned value could be different as model owner could update the
-     * `display_name` between any two model training.
-     * 
- * - * string display_name = 5; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.AnnotationPayload) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.AnnotationPayload) - private static final com.google.cloud.automl.v1beta1.AnnotationPayload DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.AnnotationPayload(); - } - - public static com.google.cloud.automl.v1beta1.AnnotationPayload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AnnotationPayload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AnnotationPayload(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.AnnotationPayload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOrBuilder.java deleted file mode 100644 index f22edd3d4..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOrBuilder.java +++ /dev/null @@ -1,389 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/annotation_payload.proto - -package com.google.cloud.automl.v1beta1; - -public interface AnnotationPayloadOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.AnnotationPayload) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Annotation details for translation.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - * - * @return Whether the translation field is set. - */ - boolean hasTranslation(); - /** - * - * - *
-   * Annotation details for translation.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - * - * @return The translation. - */ - com.google.cloud.automl.v1beta1.TranslationAnnotation getTranslation(); - /** - * - * - *
-   * Annotation details for translation.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; - */ - com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder getTranslationOrBuilder(); - - /** - * - * - *
-   * Annotation details for content or image classification.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - * - * @return Whether the classification field is set. - */ - boolean hasClassification(); - /** - * - * - *
-   * Annotation details for content or image classification.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - * - * @return The classification. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation getClassification(); - /** - * - * - *
-   * Annotation details for content or image classification.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder - getClassificationOrBuilder(); - - /** - * - * - *
-   * Annotation details for image object detection.
-   * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - * - * @return Whether the imageObjectDetection field is set. - */ - boolean hasImageObjectDetection(); - /** - * - * - *
-   * Annotation details for image object detection.
-   * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - * - * @return The imageObjectDetection. - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation getImageObjectDetection(); - /** - * - * - *
-   * Annotation details for image object detection.
-   * 
- * - * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; - * - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder - getImageObjectDetectionOrBuilder(); - - /** - * - * - *
-   * Annotation details for video classification.
-   * Returned for Video Classification predictions.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - * - * @return Whether the videoClassification field is set. - */ - boolean hasVideoClassification(); - /** - * - * - *
-   * Annotation details for video classification.
-   * Returned for Video Classification predictions.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - * - * @return The videoClassification. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - getVideoClassification(); - /** - * - * - *
-   * Annotation details for video classification.
-   * Returned for Video Classification predictions.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotationOrBuilder - getVideoClassificationOrBuilder(); - - /** - * - * - *
-   * Annotation details for video object tracking.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - * - * @return Whether the videoObjectTracking field is set. - */ - boolean hasVideoObjectTracking(); - /** - * - * - *
-   * Annotation details for video object tracking.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - * - * @return The videoObjectTracking. - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation getVideoObjectTracking(); - /** - * - * - *
-   * Annotation details for video object tracking.
-   * 
- * - * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; - * - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder - getVideoObjectTrackingOrBuilder(); - - /** - * - * - *
-   * Annotation details for text extraction.
-   * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - * - * @return Whether the textExtraction field is set. - */ - boolean hasTextExtraction(); - /** - * - * - *
-   * Annotation details for text extraction.
-   * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - * - * @return The textExtraction. - */ - com.google.cloud.automl.v1beta1.TextExtractionAnnotation getTextExtraction(); - /** - * - * - *
-   * Annotation details for text extraction.
-   * 
- * - * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; - */ - com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder getTextExtractionOrBuilder(); - - /** - * - * - *
-   * Annotation details for text sentiment.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - * - * @return Whether the textSentiment field is set. - */ - boolean hasTextSentiment(); - /** - * - * - *
-   * Annotation details for text sentiment.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - * - * @return The textSentiment. - */ - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation getTextSentiment(); - /** - * - * - *
-   * Annotation details for text sentiment.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; - */ - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder - getTextSentimentOrBuilder(); - - /** - * - * - *
-   * Annotation details for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - * - * @return Whether the tables field is set. - */ - boolean hasTables(); - /** - * - * - *
-   * Annotation details for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - * - * @return The tables. - */ - com.google.cloud.automl.v1beta1.TablesAnnotation getTables(); - /** - * - * - *
-   * Annotation details for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; - */ - com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder getTablesOrBuilder(); - - /** - * - * - *
-   * Output only . The resource ID of the annotation spec that
-   * this annotation pertains to. The annotation spec comes from either an
-   * ancestor dataset, or the dataset that was used to train the model in use.
-   * 
- * - * string annotation_spec_id = 1; - * - * @return The annotationSpecId. - */ - java.lang.String getAnnotationSpecId(); - /** - * - * - *
-   * Output only . The resource ID of the annotation spec that
-   * this annotation pertains to. The annotation spec comes from either an
-   * ancestor dataset, or the dataset that was used to train the model in use.
-   * 
- * - * string annotation_spec_id = 1; - * - * @return The bytes for annotationSpecId. - */ - com.google.protobuf.ByteString getAnnotationSpecIdBytes(); - - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-   * when the model was trained. Because this field returns a value at model
-   * training time, for different models trained using the same dataset, the
-   * returned value could be different as model owner could update the
-   * `display_name` between any two model training.
-   * 
- * - * string display_name = 5; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
-   * when the model was trained. Because this field returns a value at model
-   * training time, for different models trained using the same dataset, the
-   * returned value could be different as model owner could update the
-   * `display_name` between any two model training.
-   * 
- * - * string display_name = 5; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - public com.google.cloud.automl.v1beta1.AnnotationPayload.DetailCase getDetailCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOuterClass.java deleted file mode 100644 index 28ba9778c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationPayloadOuterClass.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/annotation_payload.proto - -package com.google.cloud.automl.v1beta1; - -public final class AnnotationPayloadOuterClass { - private AnnotationPayloadOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_AnnotationPayload_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/automl/v1beta1/annotation" - + "_payload.proto\022\033google.cloud.automl.v1be" - + "ta1\0320google/cloud/automl/v1beta1/classif" - + "ication.proto\032+google/cloud/automl/v1bet" - + "a1/detection.proto\032(google/cloud/automl/" - + "v1beta1/tables.proto\0321google/cloud/autom" - + "l/v1beta1/text_extraction.proto\0320google/" - + "cloud/automl/v1beta1/text_sentiment.prot" - + "o\032-google/cloud/automl/v1beta1/translati" - + "on.proto\032\031google/protobuf/any.proto\032\034goo" - + "gle/api/annotations.proto\"\346\005\n\021Annotation" - + "Payload\022I\n\013translation\030\002 \001(\01322.google.cl" - + "oud.automl.v1beta1.TranslationAnnotation" - + "H\000\022O\n\016classification\030\003 \001(\01325.google.clou" - + "d.automl.v1beta1.ClassificationAnnotatio" - + "nH\000\022]\n\026image_object_detection\030\004 \001(\0132;.go" - + "ogle.cloud.automl.v1beta1.ImageObjectDet" - + "ectionAnnotationH\000\022Z\n\024video_classificati" - + "on\030\t \001(\0132:.google.cloud.automl.v1beta1.V" - + "ideoClassificationAnnotationH\000\022[\n\025video_" - + "object_tracking\030\010 \001(\0132:.google.cloud.aut" - + "oml.v1beta1.VideoObjectTrackingAnnotatio" - + "nH\000\022P\n\017text_extraction\030\006 \001(\01325.google.cl" - + "oud.automl.v1beta1.TextExtractionAnnotat" - + "ionH\000\022N\n\016text_sentiment\030\007 \001(\01324.google.c" - + "loud.automl.v1beta1.TextSentimentAnnotat" - + "ionH\000\022?\n\006tables\030\n \001(\0132-.google.cloud.aut" - + "oml.v1beta1.TablesAnnotationH\000\022\032\n\022annota" - + "tion_spec_id\030\001 \001(\t\022\024\n\014display_name\030\005 \001(\t" - + "B\010\n\006detailB\245\001\n\037com.google.cloud.automl.v" - + "1beta1P\001ZAgoogle.golang.org/genproto/goo" - + "gleapis/cloud/automl/v1beta1;automl\312\002\033Go" - + "ogle\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Clou" - + "d::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Detection.getDescriptor(), - com.google.cloud.automl.v1beta1.Tables.getDescriptor(), - com.google.cloud.automl.v1beta1.TextExtraction.getDescriptor(), - com.google.cloud.automl.v1beta1.TextSentimentProto.getDescriptor(), - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_AnnotationPayload_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor, - new java.lang.String[] { - "Translation", - "Classification", - "ImageObjectDetection", - "VideoClassification", - "VideoObjectTracking", - "TextExtraction", - "TextSentiment", - "Tables", - "AnnotationSpecId", - "DisplayName", - "Detail", - }); - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Detection.getDescriptor(); - com.google.cloud.automl.v1beta1.Tables.getDescriptor(); - com.google.cloud.automl.v1beta1.TextExtraction.getDescriptor(); - com.google.cloud.automl.v1beta1.TextSentimentProto.getDescriptor(); - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpec.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpec.java deleted file mode 100644 index 6010ebe99..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpec.java +++ /dev/null @@ -1,922 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/annotation_spec.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A definition of an annotation spec.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.AnnotationSpec} - */ -public final class AnnotationSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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_ = ""; - } - - @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 72: - { - exampleCount_ = 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.automl.v1beta1.AnnotationSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.AnnotationSpec.class, - com.google.cloud.automl.v1beta1.AnnotationSpec.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. Resource name of the annotation spec.
-   * Form:
-   * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-   * 
- * - * string name = 1; - * - * @return The name. - */ - 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 spec.
-   * Form:
-   * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Required. The name of the annotation spec to show in the interface. The name can be
-   * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-   * 
- * - * string display_name = 2; - * - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the annotation spec to show in the interface. The name can be
-   * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-   * 
- * - * string display_name = 2; - * - * @return The bytes for displayName. - */ - 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 EXAMPLE_COUNT_FIELD_NUMBER = 9; - private int exampleCount_; - /** - * - * - *
-   * Output only. The number of examples in the parent dataset
-   * labeled by the annotation spec.
-   * 
- * - * int32 example_count = 9; - * - * @return The exampleCount. - */ - public int getExampleCount() { - return exampleCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (exampleCount_ != 0) { - output.writeInt32(9, exampleCount_); - } - 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 (exampleCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, exampleCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.AnnotationSpec)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.AnnotationSpec other = - (com.google.cloud.automl.v1beta1.AnnotationSpec) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (getExampleCount() != other.getExampleCount()) return false; - if (!unknownFields.equals(other.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) + EXAMPLE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getExampleCount(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.AnnotationSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.AnnotationSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.AnnotationSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.AnnotationSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.AnnotationSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.AnnotationSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.AnnotationSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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; - } - /** - * - * - *
-   * A definition of an annotation spec.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.AnnotationSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.AnnotationSpec) - com.google.cloud.automl.v1beta1.AnnotationSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.AnnotationSpec.class, - com.google.cloud.automl.v1beta1.AnnotationSpec.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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_ = ""; - - exampleCount_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_AnnotationSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.AnnotationSpec getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.AnnotationSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.AnnotationSpec build() { - com.google.cloud.automl.v1beta1.AnnotationSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.AnnotationSpec buildPartial() { - com.google.cloud.automl.v1beta1.AnnotationSpec result = - new com.google.cloud.automl.v1beta1.AnnotationSpec(this); - result.name_ = name_; - result.displayName_ = displayName_; - result.exampleCount_ = exampleCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.AnnotationSpec) { - return mergeFrom((com.google.cloud.automl.v1beta1.AnnotationSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.AnnotationSpec other) { - if (other == com.google.cloud.automl.v1beta1.AnnotationSpec.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (other.getExampleCount() != 0) { - setExampleCount(other.getExampleCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.AnnotationSpec parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.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 annotation spec.
-     * Form:
-     * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. Resource name of the annotation spec.
-     * Form:
-     * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. Resource name of the annotation spec.
-     * Form:
-     * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-     * 
- * - * 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; - } - /** - * - * - *
-     * Output only. Resource name of the annotation spec.
-     * Form:
-     * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Resource name of the annotation spec.
-     * Form:
-     * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-     * 
- * - * 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 name of the annotation spec to show in the interface. The name can be
-     * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Required. The name of the annotation spec to show in the interface. The name can be
-     * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Required. The name of the annotation spec to show in the interface. The name can be
-     * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Required. The name of the annotation spec to show in the interface. The name can be
-     * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-     * 
- * - * string display_name = 2; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the annotation spec to show in the interface. The name can be
-     * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-     * 
- * - * 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 int exampleCount_; - /** - * - * - *
-     * Output only. The number of examples in the parent dataset
-     * labeled by the annotation spec.
-     * 
- * - * int32 example_count = 9; - * - * @return The exampleCount. - */ - public int getExampleCount() { - return exampleCount_; - } - /** - * - * - *
-     * Output only. The number of examples in the parent dataset
-     * labeled by the annotation spec.
-     * 
- * - * int32 example_count = 9; - * - * @param value The exampleCount to set. - * @return This builder for chaining. - */ - public Builder setExampleCount(int value) { - - exampleCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of examples in the parent dataset
-     * labeled by the annotation spec.
-     * 
- * - * int32 example_count = 9; - * - * @return This builder for chaining. - */ - public Builder clearExampleCount() { - - exampleCount_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.AnnotationSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.AnnotationSpec) - private static final com.google.cloud.automl.v1beta1.AnnotationSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.AnnotationSpec(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.AnnotationSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java deleted file mode 100644 index eda2ccfd2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.automl.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class AnnotationSpecName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - 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; - - 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); - } - - private AnnotationSpecName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataset = Preconditions.checkNotNull(builder.getDataset()); - annotationSpec = Preconditions.checkNotNull(builder.getAnnotationSpec()); - } - - public static AnnotationSpecName of( - String project, String location, String dataset, String annotationSpec) { - return newBuilder() - .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 = - PATH_TEMPLATE.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 PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldMapBuilder.put("dataset", dataset); - fieldMapBuilder.put("annotationSpec", annotationSpec); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate( - "project", - project, - "location", - location, - "dataset", - dataset, - "annotation_spec", - annotationSpec); - } - - /** Builder for AnnotationSpecName. */ - public static class Builder { - - private String project; - private String location; - private String dataset; - private String annotationSpec; - - 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() {} - - private Builder(AnnotationSpecName annotationSpecName) { - project = annotationSpecName.project; - location = annotationSpecName.location; - dataset = annotationSpecName.dataset; - annotationSpec = annotationSpecName.annotationSpec; - } - - public AnnotationSpecName build() { - return new AnnotationSpecName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof AnnotationSpecName) { - AnnotationSpecName that = (AnnotationSpecName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataset.equals(that.dataset)) - && (this.annotationSpec.equals(that.annotationSpec)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataset.hashCode(); - h *= 1000003; - h ^= annotationSpec.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOrBuilder.java deleted file mode 100644 index 439b1e004..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/annotation_spec.proto - -package com.google.cloud.automl.v1beta1; - -public interface AnnotationSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.AnnotationSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Resource name of the annotation spec.
-   * Form:
-   * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. Resource name of the annotation spec.
-   * Form:
-   * 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}'
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The name of the annotation spec to show in the interface. The name can be
-   * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-   * 
- * - * string display_name = 2; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Required. The name of the annotation spec to show in the interface. The name can be
-   * up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`.
-   * 
- * - * string display_name = 2; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Output only. The number of examples in the parent dataset
-   * labeled by the annotation spec.
-   * 
- * - * int32 example_count = 9; - * - * @return The exampleCount. - */ - int getExampleCount(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOuterClass.java deleted file mode 100644 index ff959130e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecOuterClass.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/annotation_spec.proto - -package com.google.cloud.automl.v1beta1; - -public final class AnnotationSpecOuterClass { - private AnnotationSpecOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_AnnotationSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_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 = { - "\n1google/cloud/automl/v1beta1/annotation" - + "_spec.proto\022\033google.cloud.automl.v1beta1" - + "\032\031google/api/resource.proto\032\034google/api/" - + "annotations.proto\"\326\001\n\016AnnotationSpec\022\014\n\004" - + "name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\025\n\rexam" - + "ple_count\030\t \001(\005:\210\001\352A\204\001\n$automl.googleapi" - + "s.com/AnnotationSpec\022\\projects/{project}" - + "/locations/{location}/datasets/{dataset}" - + "/annotationSpecs/{annotation_spec}B\245\001\n\037c" - + "om.google.cloud.automl.v1beta1P\001ZAgoogle" - + ".golang.org/genproto/googleapis/cloud/au" - + "toml/v1beta1;automl\312\002\033Google\\Cloud\\AutoM" - + "l\\V1beta1\352\002\036Google::Cloud::AutoML::V1bet" - + "a1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_AnnotationSpec_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_AnnotationSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_AnnotationSpec_descriptor, - new java.lang.String[] { - "Name", "DisplayName", "ExampleCount", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStats.java deleted file mode 100644 index 3dc79ac32..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStats.java +++ /dev/null @@ -1,741 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The data statistics of a series of ARRAY values.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ArrayStats} - */ -public final class ArrayStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ArrayStats) - ArrayStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use ArrayStats.newBuilder() to construct. - private ArrayStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ArrayStats() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ArrayStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ArrayStats( - 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: - { - com.google.cloud.automl.v1beta1.DataStats.Builder subBuilder = null; - if (memberStats_ != null) { - subBuilder = memberStats_.toBuilder(); - } - memberStats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DataStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(memberStats_); - memberStats_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_ArrayStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_ArrayStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ArrayStats.class, - com.google.cloud.automl.v1beta1.ArrayStats.Builder.class); - } - - public static final int MEMBER_STATS_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.DataStats memberStats_; - /** - * - * - *
-   * Stats of all the values of all arrays, as if they were a single long
-   * series of data. The type depends on the element type of the array.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - * - * @return Whether the memberStats field is set. - */ - public boolean hasMemberStats() { - return memberStats_ != null; - } - /** - * - * - *
-   * Stats of all the values of all arrays, as if they were a single long
-   * series of data. The type depends on the element type of the array.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - * - * @return The memberStats. - */ - public com.google.cloud.automl.v1beta1.DataStats getMemberStats() { - return memberStats_ == null - ? com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance() - : memberStats_; - } - /** - * - * - *
-   * Stats of all the values of all arrays, as if they were a single long
-   * series of data. The type depends on the element type of the array.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - public com.google.cloud.automl.v1beta1.DataStatsOrBuilder getMemberStatsOrBuilder() { - return getMemberStats(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (memberStats_ != null) { - output.writeMessage(2, getMemberStats()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (memberStats_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMemberStats()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ArrayStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ArrayStats other = - (com.google.cloud.automl.v1beta1.ArrayStats) obj; - - if (hasMemberStats() != other.hasMemberStats()) return false; - if (hasMemberStats()) { - if (!getMemberStats().equals(other.getMemberStats())) return false; - } - if (!unknownFields.equals(other.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 (hasMemberStats()) { - hash = (37 * hash) + MEMBER_STATS_FIELD_NUMBER; - hash = (53 * hash) + getMemberStats().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ArrayStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data statistics of a series of ARRAY values.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ArrayStats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ArrayStats) - com.google.cloud.automl.v1beta1.ArrayStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_ArrayStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_ArrayStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ArrayStats.class, - com.google.cloud.automl.v1beta1.ArrayStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ArrayStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (memberStatsBuilder_ == null) { - memberStats_ = null; - } else { - memberStats_ = null; - memberStatsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_ArrayStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ArrayStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ArrayStats build() { - com.google.cloud.automl.v1beta1.ArrayStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ArrayStats buildPartial() { - com.google.cloud.automl.v1beta1.ArrayStats result = - new com.google.cloud.automl.v1beta1.ArrayStats(this); - if (memberStatsBuilder_ == null) { - result.memberStats_ = memberStats_; - } else { - result.memberStats_ = memberStatsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ArrayStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.ArrayStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ArrayStats other) { - if (other == com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance()) return this; - if (other.hasMemberStats()) { - mergeMemberStats(other.getMemberStats()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ArrayStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.ArrayStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.DataStats memberStats_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataStats, - com.google.cloud.automl.v1beta1.DataStats.Builder, - com.google.cloud.automl.v1beta1.DataStatsOrBuilder> - memberStatsBuilder_; - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - * - * @return Whether the memberStats field is set. - */ - public boolean hasMemberStats() { - return memberStatsBuilder_ != null || memberStats_ != null; - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - * - * @return The memberStats. - */ - public com.google.cloud.automl.v1beta1.DataStats getMemberStats() { - if (memberStatsBuilder_ == null) { - return memberStats_ == null - ? com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance() - : memberStats_; - } else { - return memberStatsBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - public Builder setMemberStats(com.google.cloud.automl.v1beta1.DataStats value) { - if (memberStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - memberStats_ = value; - onChanged(); - } else { - memberStatsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - public Builder setMemberStats( - com.google.cloud.automl.v1beta1.DataStats.Builder builderForValue) { - if (memberStatsBuilder_ == null) { - memberStats_ = builderForValue.build(); - onChanged(); - } else { - memberStatsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - public Builder mergeMemberStats(com.google.cloud.automl.v1beta1.DataStats value) { - if (memberStatsBuilder_ == null) { - if (memberStats_ != null) { - memberStats_ = - com.google.cloud.automl.v1beta1.DataStats.newBuilder(memberStats_) - .mergeFrom(value) - .buildPartial(); - } else { - memberStats_ = value; - } - onChanged(); - } else { - memberStatsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - public Builder clearMemberStats() { - if (memberStatsBuilder_ == null) { - memberStats_ = null; - onChanged(); - } else { - memberStats_ = null; - memberStatsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - public com.google.cloud.automl.v1beta1.DataStats.Builder getMemberStatsBuilder() { - - onChanged(); - return getMemberStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - public com.google.cloud.automl.v1beta1.DataStatsOrBuilder getMemberStatsOrBuilder() { - if (memberStatsBuilder_ != null) { - return memberStatsBuilder_.getMessageOrBuilder(); - } else { - return memberStats_ == null - ? com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance() - : memberStats_; - } - } - /** - * - * - *
-     * Stats of all the values of all arrays, as if they were a single long
-     * series of data. The type depends on the element type of the array.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataStats, - com.google.cloud.automl.v1beta1.DataStats.Builder, - com.google.cloud.automl.v1beta1.DataStatsOrBuilder> - getMemberStatsFieldBuilder() { - if (memberStatsBuilder_ == null) { - memberStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataStats, - com.google.cloud.automl.v1beta1.DataStats.Builder, - com.google.cloud.automl.v1beta1.DataStatsOrBuilder>( - getMemberStats(), getParentForChildren(), isClean()); - memberStats_ = null; - } - return memberStatsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ArrayStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ArrayStats) - private static final com.google.cloud.automl.v1beta1.ArrayStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ArrayStats(); - } - - public static com.google.cloud.automl.v1beta1.ArrayStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ArrayStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ArrayStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ArrayStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStatsOrBuilder.java deleted file mode 100644 index 62b72935c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ArrayStatsOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface ArrayStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ArrayStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Stats of all the values of all arrays, as if they were a single long
-   * series of data. The type depends on the element type of the array.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - * - * @return Whether the memberStats field is set. - */ - boolean hasMemberStats(); - /** - * - * - *
-   * Stats of all the values of all arrays, as if they were a single long
-   * series of data. The type depends on the element type of the array.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - * - * @return The memberStats. - */ - com.google.cloud.automl.v1beta1.DataStats getMemberStats(); - /** - * - * - *
-   * Stats of all the values of all arrays, as if they were a single long
-   * series of data. The type depends on the element type of the array.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats member_stats = 2; - */ - com.google.cloud.automl.v1beta1.DataStatsOrBuilder getMemberStatsOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlProto.java deleted file mode 100644 index 2a6ca3947..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AutoMlProto.java +++ /dev/null @@ -1,689 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public final class AutoMlProto { - private AutoMlProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImportDataRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImportDataRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportDataRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportDataRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_CreateModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_CreateModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GetModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GetModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListModelsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListModelsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListModelsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListModelsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DeployModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DeployModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportModelRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportModelRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/automl/v1beta1/service.pr" - + "oto\022\033google.cloud.automl.v1beta1\032\034google" - + "/api/annotations.proto\032\027google/api/clien" - + "t.proto\032\037google/api/field_behavior.proto" - + "\032\031google/api/resource.proto\0324google/clou" - + "d/automl/v1beta1/annotation_payload.prot" - + "o\0321google/cloud/automl/v1beta1/annotatio" - + "n_spec.proto\032-google/cloud/automl/v1beta" - + "1/column_spec.proto\032)google/cloud/automl" - + "/v1beta1/dataset.proto\032\'google/cloud/aut" - + "oml/v1beta1/image.proto\032$google/cloud/au" - + "toml/v1beta1/io.proto\032\'google/cloud/auto" - + "ml/v1beta1/model.proto\0322google/cloud/aut" - + "oml/v1beta1/model_evaluation.proto\032,goog" - + "le/cloud/automl/v1beta1/operations.proto" - + "\032,google/cloud/automl/v1beta1/table_spec" - + ".proto\032#google/longrunning/operations.pr" - + "oto\032 google/protobuf/field_mask.proto\"\215\001" - + "\n\024CreateDatasetRequest\0229\n\006parent\030\001 \001(\tB)" - + "\340A\002\372A#\n!locations.googleapis.com/Locatio" - + "n\022:\n\007dataset\030\002 \001(\0132$.google.cloud.automl" - + ".v1beta1.DatasetB\003\340A\002\"H\n\021GetDatasetReque" - + "st\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035automl.googlea" - + "pis.com/Dataset\"\207\001\n\023ListDatasetsRequest\022" - + "9\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googl" - + "eapis.com/Location\022\016\n\006filter\030\003 \001(\t\022\021\n\tpa" - + "ge_size\030\004 \001(\005\022\022\n\npage_token\030\006 \001(\t\"g\n\024Lis" - + "tDatasetsResponse\0226\n\010datasets\030\001 \003(\0132$.go" - + "ogle.cloud.automl.v1beta1.Dataset\022\027\n\017nex" - + "t_page_token\030\002 \001(\t\"\203\001\n\024UpdateDatasetRequ" - + "est\022:\n\007dataset\030\001 \001(\0132$.google.cloud.auto" - + "ml.v1beta1.DatasetB\003\340A\002\022/\n\013update_mask\030\002" - + " \001(\0132\032.google.protobuf.FieldMask\"K\n\024Dele" - + "teDatasetRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035" - + "automl.googleapis.com/Dataset\"\215\001\n\021Import" - + "DataRequest\0223\n\004name\030\001 \001(\tB%\340A\002\372A\037\n\035autom" - + "l.googleapis.com/Dataset\022C\n\014input_config" - + "\030\003 \001(\0132(.google.cloud.automl.v1beta1.Inp" - + "utConfigB\003\340A\002\"\217\001\n\021ExportDataRequest\0223\n\004n" - + "ame\030\001 \001(\tB%\340A\002\372A\037\n\035automl.googleapis.com" - + "/Dataset\022E\n\routput_config\030\003 \001(\0132).google" - + ".cloud.automl.v1beta1.OutputConfigB\003\340A\002\"" - + "V\n\030GetAnnotationSpecRequest\022:\n\004name\030\001 \001(" - + "\tB,\340A\002\372A&\n$automl.googleapis.com/Annotat" - + "ionSpec\"|\n\023GetTableSpecRequest\0225\n\004name\030\001" - + " \001(\tB\'\340A\002\372A!\n\037automl.googleapis.com/Tabl" - + "eSpec\022.\n\nfield_mask\030\002 \001(\0132\032.google.proto" - + "buf.FieldMask\"\265\001\n\025ListTableSpecsRequest\022" - + "5\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035automl.googleap" - + "is.com/Dataset\022.\n\nfield_mask\030\002 \001(\0132\032.goo" - + "gle.protobuf.FieldMask\022\016\n\006filter\030\003 \001(\t\022\021" - + "\n\tpage_size\030\004 \001(\005\022\022\n\npage_token\030\006 \001(\t\"n\n" - + "\026ListTableSpecsResponse\022;\n\013table_specs\030\001" - + " \003(\0132&.google.cloud.automl.v1beta1.Table" - + "Spec\022\027\n\017next_page_token\030\002 \001(\t\"\212\001\n\026Update" - + "TableSpecRequest\022?\n\ntable_spec\030\001 \001(\0132&.g" - + "oogle.cloud.automl.v1beta1.TableSpecB\003\340A" - + "\002\022/\n\013update_mask\030\002 \001(\0132\032.google.protobuf" - + ".FieldMask\"~\n\024GetColumnSpecRequest\0226\n\004na" - + "me\030\001 \001(\tB(\340A\002\372A\"\n automl.googleapis.com/" - + "ColumnSpec\022.\n\nfield_mask\030\002 \001(\0132\032.google." - + "protobuf.FieldMask\"\270\001\n\026ListColumnSpecsRe" - + "quest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037automl.go" - + "ogleapis.com/TableSpec\022.\n\nfield_mask\030\002 \001" - + "(\0132\032.google.protobuf.FieldMask\022\016\n\006filter" - + "\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_token\030" - + "\006 \001(\t\"q\n\027ListColumnSpecsResponse\022=\n\014colu" - + "mn_specs\030\001 \003(\0132\'.google.cloud.automl.v1b" - + "eta1.ColumnSpec\022\027\n\017next_page_token\030\002 \001(\t" - + "\"\215\001\n\027UpdateColumnSpecRequest\022A\n\013column_s" - + "pec\030\001 \001(\0132\'.google.cloud.automl.v1beta1." - + "ColumnSpecB\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.g" - + "oogle.protobuf.FieldMask\"\207\001\n\022CreateModel" - + "Request\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locatio" - + "ns.googleapis.com/Location\0226\n\005model\030\004 \001(" - + "\0132\".google.cloud.automl.v1beta1.ModelB\003\340" - + "A\002\"D\n\017GetModelRequest\0221\n\004name\030\001 \001(\tB#\340A\002" - + "\372A\035\n\033automl.googleapis.com/Model\"\205\001\n\021Lis" - + "tModelsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!" - + "locations.googleapis.com/Location\022\016\n\006fil" - + "ter\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_tok" - + "en\030\006 \001(\t\"`\n\022ListModelsResponse\0221\n\005model\030" - + "\001 \003(\0132\".google.cloud.automl.v1beta1.Mode" - + "l\022\027\n\017next_page_token\030\002 \001(\t\"G\n\022DeleteMode" - + "lRequest\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033automl.g" - + "oogleapis.com/Model\"\357\002\n\022DeployModelReque" - + "st\022\204\001\n0image_object_detection_model_depl" - + "oyment_metadata\030\002 \001(\0132H.google.cloud.aut" - + "oml.v1beta1.ImageObjectDetectionModelDep" - + "loymentMetadataH\000\022\201\001\n.image_classificati" - + "on_model_deployment_metadata\030\004 \001(\0132G.goo" - + "gle.cloud.automl.v1beta1.ImageClassifica" - + "tionModelDeploymentMetadataH\000\0221\n\004name\030\001 " - + "\001(\tB#\340A\002\372A\035\n\033automl.googleapis.com/Model" - + "B\033\n\031model_deployment_metadata\"I\n\024Undeplo" - + "yModelRequest\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033aut" - + "oml.googleapis.com/Model\"\231\001\n\022ExportModel" - + "Request\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033automl.go" - + "ogleapis.com/Model\022P\n\routput_config\030\003 \001(" - + "\01324.google.cloud.automl.v1beta1.ModelExp" - + "ortOutputConfigB\003\340A\002\"\261\001\n\036ExportEvaluated" - + "ExamplesRequest\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033a" - + "utoml.googleapis.com/Model\022\\\n\routput_con" - + "fig\030\003 \001(\0132@.google.cloud.automl.v1beta1." - + "ExportEvaluatedExamplesOutputConfigB\003\340A\002" - + "\"X\n\031GetModelEvaluationRequest\022;\n\004name\030\001 " - + "\001(\tB-\340A\002\372A\'\n%automl.googleapis.com/Model" - + "Evaluation\"\211\001\n\033ListModelEvaluationsReque" - + "st\0223\n\006parent\030\001 \001(\tB#\340A\002\372A\035\n\033automl.googl" - + "eapis.com/Model\022\016\n\006filter\030\003 \001(\t\022\021\n\tpage_" - + "size\030\004 \001(\005\022\022\n\npage_token\030\006 \001(\t\"\177\n\034ListMo" - + "delEvaluationsResponse\022F\n\020model_evaluati" - + "on\030\001 \003(\0132,.google.cloud.automl.v1beta1.M" - + "odelEvaluation\022\027\n\017next_page_token\030\002 \001(\t2" - + "\355\'\n\006AutoMl\022\275\001\n\rCreateDataset\0221.google.cl" - + "oud.automl.v1beta1.CreateDatasetRequest\032" - + "$.google.cloud.automl.v1beta1.Dataset\"S\202" - + "\323\344\223\002<\"1/v1beta1/{parent=projects/*/locat" - + "ions/*}/datasets:\007dataset\332A\016parent,datas" - + "et\022\244\001\n\nGetDataset\022..google.cloud.automl." - + "v1beta1.GetDatasetRequest\032$.google.cloud" - + ".automl.v1beta1.Dataset\"@\202\323\344\223\0023\0221/v1beta" - + "1/{name=projects/*/locations/*/datasets/" - + "*}\332A\004name\022\267\001\n\014ListDatasets\0220.google.clou" - + "d.automl.v1beta1.ListDatasetsRequest\0321.g" - + "oogle.cloud.automl.v1beta1.ListDatasetsR" - + "esponse\"B\202\323\344\223\0023\0221/v1beta1/{parent=projec" - + "ts/*/locations/*}/datasets\332A\006parent\022\276\001\n\r" - + "UpdateDataset\0221.google.cloud.automl.v1be" - + "ta1.UpdateDatasetRequest\032$.google.cloud." - + "automl.v1beta1.Dataset\"T\202\323\344\223\002D29/v1beta1" - + "/{dataset.name=projects/*/locations/*/da" - + "tasets/*}:\007dataset\332A\007dataset\022\320\001\n\rDeleteD" - + "ataset\0221.google.cloud.automl.v1beta1.Del" - + "eteDatasetRequest\032\035.google.longrunning.O" - + "peration\"m\202\323\344\223\0023*1/v1beta1/{name=project" - + "s/*/locations/*/datasets/*}\332A\004name\312A*\n\025g" - + "oogle.protobuf.Empty\022\021OperationMetadata\022" - + "\346\001\n\nImportData\022..google.cloud.automl.v1b" - + "eta1.ImportDataRequest\032\035.google.longrunn" - + "ing.Operation\"\210\001\202\323\344\223\002A\"/v1beta1/{n" - + "ame=projects/*/locations/*/datasets/*/ta" - + "bleSpecs/*}\332A\004name\022\312\001\n\016ListTableSpecs\0222." - + "google.cloud.automl.v1beta1.ListTableSpe" - + "csRequest\0323.google.cloud.automl.v1beta1." - + "ListTableSpecsResponse\"O\202\323\344\223\002@\022>/v1beta1" - + "/{parent=projects/*/locations/*/datasets" - + "/*}/tableSpecs\332A\006parent\022\332\001\n\017UpdateTableS" - + "pec\0223.google.cloud.automl.v1beta1.Update" - + "TableSpecRequest\032&.google.cloud.automl.v" - + "1beta1.TableSpec\"j\202\323\344\223\002W2I/v1beta1/{tabl" - + "e_spec.name=projects/*/locations/*/datas" - + "ets/*/tableSpecs/*}:\ntable_spec\332A\ntable_" - + "spec\022\310\001\n\rGetColumnSpec\0221.google.cloud.au" - + "toml.v1beta1.GetColumnSpecRequest\032\'.goog" - + "le.cloud.automl.v1beta1.ColumnSpec\"[\202\323\344\223" - + "\002N\022L/v1beta1/{name=projects/*/locations/" - + "*/datasets/*/tableSpecs/*/columnSpecs/*}" - + "\332A\004name\022\333\001\n\017ListColumnSpecs\0223.google.clo" - + "ud.automl.v1beta1.ListColumnSpecsRequest" - + "\0324.google.cloud.automl.v1beta1.ListColum" - + "nSpecsResponse\"]\202\323\344\223\002N\022L/v1beta1/{parent" - + "=projects/*/locations/*/datasets/*/table" - + "Specs/*}/columnSpecs\332A\006parent\022\356\001\n\020Update" - + "ColumnSpec\0224.google.cloud.automl.v1beta1" - + ".UpdateColumnSpecRequest\032\'.google.cloud." - + "automl.v1beta1.ColumnSpec\"{\202\323\344\223\002g2X/v1be" - + "ta1/{column_spec.name=projects/*/locatio" - + "ns/*/datasets/*/tableSpecs/*/columnSpecs" - + "/*}:\013column_spec\332A\013column_spec\022\311\001\n\013Creat" - + "eModel\022/.google.cloud.automl.v1beta1.Cre" - + "ateModelRequest\032\035.google.longrunning.Ope" - + "ration\"j\202\323\344\223\0028\"//v1beta1/{parent=project" - + "s/*/locations/*}/models:\005model\332A\014parent," - + "model\312A\032\n\005Model\022\021OperationMetadata\022\234\001\n\010G" - + "etModel\022,.google.cloud.automl.v1beta1.Ge" - + "tModelRequest\032\".google.cloud.automl.v1be" - + "ta1.Model\">\202\323\344\223\0021\022//v1beta1/{name=projec" - + "ts/*/locations/*/models/*}\332A\004name\022\257\001\n\nLi" - + "stModels\022..google.cloud.automl.v1beta1.L" - + "istModelsRequest\032/.google.cloud.automl.v" - + "1beta1.ListModelsResponse\"@\202\323\344\223\0021\022//v1be" - + "ta1/{parent=projects/*/locations/*}/mode" - + "ls\332A\006parent\022\312\001\n\013DeleteModel\022/.google.clo" - + "ud.automl.v1beta1.DeleteModelRequest\032\035.g" - + "oogle.longrunning.Operation\"k\202\323\344\223\0021*//v1" - + "beta1/{name=projects/*/locations/*/model" - + "s/*}\332A\004name\312A*\n\025google.protobuf.Empty\022\021O" - + "perationMetadata\022\324\001\n\013DeployModel\022/.googl" - + "e.cloud.automl.v1beta1.DeployModelReques" - + "t\032\035.google.longrunning.Operation\"u\202\323\344\223\002;" - + "\"6/v1beta1/{name=projects/*/locations/*/" - + "models/*}:deploy:\001*\332A\004name\312A*\n\025google.pr" - + "otobuf.Empty\022\021OperationMetadata\022\332\001\n\rUnde" - + "ployModel\0221.google.cloud.automl.v1beta1." - + "UndeployModelRequest\032\035.google.longrunnin" - + "g.Operation\"w\202\323\344\223\002=\"8/v1beta1/{name=proj" - + "ects/*/locations/*/models/*}:undeploy:\001*" - + "\332A\004name\312A*\n\025google.protobuf.Empty\022\021Opera" - + "tionMetadata\022\343\001\n\013ExportModel\022/.google.cl" - + "oud.automl.v1beta1.ExportModelRequest\032\035." - + "google.longrunning.Operation\"\203\001\202\323\344\223\002;\"6/" - + "v1beta1/{name=projects/*/locations/*/mod" - + "els/*}:export:\001*\332A\022name,output_config\312A*" - + "\n\025google.protobuf.Empty\022\021OperationMetada" - + "ta\022\214\002\n\027ExportEvaluatedExamples\022;.google." - + "cloud.automl.v1beta1.ExportEvaluatedExam" - + "plesRequest\032\035.google.longrunning.Operati" - + "on\"\224\001\202\323\344\223\002L\"G/v1beta1/{name=projects/*/l" - + "ocations/*/models/*}:exportEvaluatedExam" - + "ples:\001*\332A\022name,output_config\312A*\n\025google." - + "protobuf.Empty\022\021OperationMetadata\022\315\001\n\022Ge" - + "tModelEvaluation\0226.google.cloud.automl.v" - + "1beta1.GetModelEvaluationRequest\032,.googl" - + "e.cloud.automl.v1beta1.ModelEvaluation\"Q" - + "\202\323\344\223\002D\022B/v1beta1/{name=projects/*/locati" - + "ons/*/models/*/modelEvaluations/*}\332A\004nam" - + "e\022\340\001\n\024ListModelEvaluations\0228.google.clou" - + "d.automl.v1beta1.ListModelEvaluationsReq" - + "uest\0329.google.cloud.automl.v1beta1.ListM" - + "odelEvaluationsResponse\"S\202\323\344\223\002D\022B/v1beta" - + "1/{parent=projects/*/locations/*/models/" - + "*}/modelEvaluations\332A\006parent\032I\312A\025automl." - + "googleapis.com\322A.https://www.googleapis." - + "com/auth/cloud-platformB\262\001\n\037com.google.c" - + "loud.automl.v1beta1B\013AutoMlProtoP\001ZAgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "automl/v1beta1;automl\312\002\033Google\\Cloud\\Aut" - + "oMl\\V1beta1\352\002\036Google::Cloud::AutoML::V1b" - + "eta1b\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.automl.v1beta1.AnnotationPayloadOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.ColumnSpecOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.DatasetOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.ImageProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Io.getDescriptor(), - com.google.cloud.automl.v1beta1.ModelOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.Operations.getDescriptor(), - com.google.cloud.automl.v1beta1.TableSpecOuterClass.getDescriptor(), - com.google.longrunning.OperationsProto.getDescriptor(), - com.google.protobuf.FieldMaskProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_descriptor, - new java.lang.String[] { - "Parent", "Dataset", - }); - internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_descriptor, - new java.lang.String[] { - "Parent", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_descriptor, - new java.lang.String[] { - "Datasets", "NextPageToken", - }); - internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_descriptor, - new java.lang.String[] { - "Dataset", "UpdateMask", - }); - internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_automl_v1beta1_ImportDataRequest_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_automl_v1beta1_ImportDataRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImportDataRequest_descriptor, - new java.lang.String[] { - "Name", "InputConfig", - }); - internal_static_google_cloud_automl_v1beta1_ExportDataRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_automl_v1beta1_ExportDataRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportDataRequest_descriptor, - new java.lang.String[] { - "Name", "OutputConfig", - }); - internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_descriptor, - new java.lang.String[] { - "Name", "FieldMask", - }); - internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_descriptor, - new java.lang.String[] { - "Parent", "FieldMask", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_descriptor, - new java.lang.String[] { - "TableSpecs", "NextPageToken", - }); - internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_descriptor, - new java.lang.String[] { - "TableSpec", "UpdateMask", - }); - internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_descriptor, - new java.lang.String[] { - "Name", "FieldMask", - }); - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_descriptor, - new java.lang.String[] { - "Parent", "FieldMask", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_descriptor, - new java.lang.String[] { - "ColumnSpecs", "NextPageToken", - }); - internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_descriptor = - getDescriptor().getMessageTypes().get(16); - internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_descriptor, - new java.lang.String[] { - "ColumnSpec", "UpdateMask", - }); - internal_static_google_cloud_automl_v1beta1_CreateModelRequest_descriptor = - getDescriptor().getMessageTypes().get(17); - internal_static_google_cloud_automl_v1beta1_CreateModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_CreateModelRequest_descriptor, - new java.lang.String[] { - "Parent", "Model", - }); - internal_static_google_cloud_automl_v1beta1_GetModelRequest_descriptor = - getDescriptor().getMessageTypes().get(18); - internal_static_google_cloud_automl_v1beta1_GetModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GetModelRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_automl_v1beta1_ListModelsRequest_descriptor = - getDescriptor().getMessageTypes().get(19); - internal_static_google_cloud_automl_v1beta1_ListModelsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListModelsRequest_descriptor, - new java.lang.String[] { - "Parent", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_automl_v1beta1_ListModelsResponse_descriptor = - getDescriptor().getMessageTypes().get(20); - internal_static_google_cloud_automl_v1beta1_ListModelsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListModelsResponse_descriptor, - new java.lang.String[] { - "Model", "NextPageToken", - }); - internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_descriptor = - getDescriptor().getMessageTypes().get(21); - internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_automl_v1beta1_DeployModelRequest_descriptor = - getDescriptor().getMessageTypes().get(22); - internal_static_google_cloud_automl_v1beta1_DeployModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DeployModelRequest_descriptor, - new java.lang.String[] { - "ImageObjectDetectionModelDeploymentMetadata", - "ImageClassificationModelDeploymentMetadata", - "Name", - "ModelDeploymentMetadata", - }); - internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_descriptor = - getDescriptor().getMessageTypes().get(23); - internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_automl_v1beta1_ExportModelRequest_descriptor = - getDescriptor().getMessageTypes().get(24); - internal_static_google_cloud_automl_v1beta1_ExportModelRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportModelRequest_descriptor, - new java.lang.String[] { - "Name", "OutputConfig", - }); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_descriptor, - new java.lang.String[] { - "Name", "OutputConfig", - }); - internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_descriptor = - getDescriptor().getMessageTypes().get(26); - internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_descriptor = - getDescriptor().getMessageTypes().get(27); - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_descriptor, - new java.lang.String[] { - "Parent", "Filter", "PageSize", "PageToken", - }); - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_descriptor, - new java.lang.String[] { - "ModelEvaluation", "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.automl.v1beta1.AnnotationPayloadOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.ColumnSpecOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.DatasetOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.ImageProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Io.getDescriptor(); - com.google.cloud.automl.v1beta1.ModelOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.Operations.getDescriptor(); - com.google.cloud.automl.v1beta1.TableSpecOuterClass.getDescriptor(); - com.google.longrunning.OperationsProto.getDescriptor(); - com.google.protobuf.FieldMaskProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfig.java deleted file mode 100644 index 4bb6d24c6..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfig.java +++ /dev/null @@ -1,1509 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Input configuration for BatchPredict Action.
- * The format of input depends on the ML problem of the model used for
- * prediction. As input source the
- * [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
- * is expected, unless specified otherwise.
- * The formats are represented in EBNF with commas being literal and with
- * non-terminal symbols defined near the end of this comment. The formats
- * are:
- *  *  For Image Classification:
- *         CSV file(s) with each line having just a single column:
- *           GCS_FILE_PATH
- *           which leads to image of up to 30MB in size. Supported
- *           extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
- *           the Batch predict output.
- *         Three sample rows:
- *           gs://folder/image1.jpeg
- *           gs://folder/image2.gif
- *           gs://folder/image3.png
- *  *  For Image Object Detection:
- *         CSV file(s) with each line having just a single column:
- *           GCS_FILE_PATH
- *           which leads to image of up to 30MB in size. Supported
- *           extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
- *           the Batch predict output.
- *         Three sample rows:
- *           gs://folder/image1.jpeg
- *           gs://folder/image2.gif
- *           gs://folder/image3.png
- *  *  For Video Classification:
- *         CSV file(s) with each line in format:
- *           GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
- *           GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
- *           duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
- *           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
- *           length of the video, and end has to be after the start.
- *         Three sample rows:
- *           gs://folder/video1.mp4,10,40
- *           gs://folder/video1.mp4,20,60
- *           gs://folder/vid2.mov,0,inf
- *  *  For Video Object Tracking:
- *         CSV file(s) with each line in format:
- *           GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
- *           GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
- *           duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
- *           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
- *           length of the video, and end has to be after the start.
- *         Three sample rows:
- *           gs://folder/video1.mp4,10,240
- *           gs://folder/video1.mp4,300,360
- *           gs://folder/vid2.mov,0,inf
- *  *  For Text Classification:
- *         CSV file(s) with each line having just a single column:
- *           GCS_FILE_PATH | TEXT_SNIPPET
- *         Any given text file can have size upto 128kB.
- *         Any given text snippet content must have 60,000 characters or less.
- *         Three sample rows:
- *           gs://folder/text1.txt
- *           "Some text content to predict"
- *           gs://folder/text3.pdf
- *         Supported file extensions: .txt, .pdf
- *  *  For Text Sentiment:
- *         CSV file(s) with each line having just a single column:
- *           GCS_FILE_PATH | TEXT_SNIPPET
- *         Any given text file can have size upto 128kB.
- *         Any given text snippet content must have 500 characters or less.
- *         Three sample rows:
- *           gs://folder/text1.txt
- *           "Some text content to predict"
- *           gs://folder/text3.pdf
- *         Supported file extensions: .txt, .pdf
- *  * For Text Extraction
- *         .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or
- *         as documents (for a single BatchPredict call only one of the these
- *         formats may be used).
- *         The in-line .JSONL file(s) contain per line a proto that
- *           wraps a temporary user-assigned TextSnippet ID (string up to 2000
- *           characters long) called "id", a TextSnippet proto (in
- *           json representation) and zero or more TextFeature protos. Any given
- *           text snippet content must have 30,000 characters or less, and also
- *           be UTF-8 NFC encoded (ASCII already is). The IDs provided should be
- *           unique.
- *         The document .JSONL file(s) contain, per line, a proto that wraps a
- *           Document proto with input_config set. Only PDF documents are
- *           supported now, and each document must be up to 2MB large.
- *         Any given .JSONL file must be 100MB or smaller, and no more than 20
- *         files may be given.
- *         Sample in-line JSON Lines file (presented here with artificial line
- *         breaks, but the only actual line break is denoted by \n):
- *           {
- *             "id": "my_first_id",
- *             "text_snippet": { "content": "dog car cat"},
- *             "text_features": [
- *               {
- *                 "text_segment": {"start_offset": 4, "end_offset": 6},
- *                 "structural_type": PARAGRAPH,
- *                 "bounding_poly": {
- *                   "normalized_vertices": [
- *                     {"x": 0.1, "y": 0.1},
- *                     {"x": 0.1, "y": 0.3},
- *                     {"x": 0.3, "y": 0.3},
- *                     {"x": 0.3, "y": 0.1},
- *                   ]
- *                 },
- *               }
- *             ],
- *           }\n
- *           {
- *             "id": "2",
- *             "text_snippet": {
- *               "content": "An elaborate content",
- *               "mime_type": "text/plain"
- *             }
- *           }
- *         Sample document JSON Lines file (presented here with artificial line
- *         breaks, but the only actual line break is denoted by \n).:
- *           {
- *             "document": {
- *               "input_config": {
- *                 "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
- *                 }
- *               }
- *             }
- *           }\n
- *           {
- *             "document": {
- *               "input_config": {
- *                 "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
- *                 }
- *               }
- *             }
- *           }
- *  *  For Tables:
- *         Either
- *         [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
- * [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source].
- *         GCS case:
- *           CSV file(s), each by itself 10GB or smaller and total size must be
- *           100GB or smaller, where first file must have a header containing
- *           column names. If the first row of a subsequent file is the same as
- *           the header, then it is also treated as a header. All other rows
- *           contain values for the corresponding columns.
- *           The column names must contain the model's
- * [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
- * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
- *           (order doesn't matter). The columns corresponding to the model's
- *           input feature column specs must contain values compatible with the
- *           column spec's data types. Prediction on all the rows, i.e. the CSV
- *           lines, will be attempted. For FORECASTING
- * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
- *           all columns having
- * [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
- *           type will be ignored.
- *           First three sample rows of a CSV file:
- *             "First Name","Last Name","Dob","Addresses"
- * "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
- * "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
- *         BigQuery case:
- *           An URI of a BigQuery table. The user data size of the BigQuery
- *           table must be 100GB or smaller.
- *           The column names must contain the model's
- * [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
- * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
- *           (order doesn't matter). The columns corresponding to the model's
- *           input feature column specs must contain values compatible with the
- *           column spec's data types. Prediction on all the rows of the table
- *           will be attempted. For FORECASTING
- * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
- *           all columns having
- * [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
- *           type will be ignored.
- *  Definitions:
- *  GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi".
- *  TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
- *                 double quotes ("")
- *  TIME_SEGMENT_START = TIME_OFFSET
- *                       Expresses a beginning, inclusive, of a time segment
- *                       within an
- *                       example that has a time dimension (e.g. video).
- *  TIME_SEGMENT_END = TIME_OFFSET
- *                     Expresses an end, exclusive, of a time segment within
- *                     an example that has a time dimension (e.g. video).
- *  TIME_OFFSET = A number of seconds as measured from the start of an
- *                example (e.g. video). Fractions are allowed, up to a
- *                microsecond precision. "inf" is allowed and it means the end
- *                of the example.
- *  Errors:
- *  If any of the provided CSV files can't be parsed or if more than certain
- *  percent of CSV rows cannot be processed then the operation fails and
- *  prediction does not happen. Regardless of overall success or failure the
- *  per-row failures, up to a certain count cap, will be listed in
- *  Operation.metadata.partial_failures.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictInputConfig} - */ -public final class BatchPredictInputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BatchPredictInputConfig) - BatchPredictInputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchPredictInputConfig.newBuilder() to construct. - private BatchPredictInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchPredictInputConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchPredictInputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchPredictInputConfig( - 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.automl.v1beta1.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.automl.v1beta1.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.automl.v1beta1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.automl.v1beta1.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.class, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.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), - BIGQUERY_SOURCE(2), - 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 2: - 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 = 1; - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - public com.google.cloud.automl.v1beta1.GcsSource getGcsSource() { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - - public static final int BIGQUERY_SOURCE_FIELD_NUMBER = 2; - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - * - * @return Whether the bigquerySource field is set. - */ - public boolean hasBigquerySource() { - return sourceCase_ == 2; - } - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - * - * @return The bigquerySource. - */ - public com.google.cloud.automl.v1beta1.BigQuerySource getBigquerySource() { - if (sourceCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - public com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { - if (sourceCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.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 (sourceCase_ == 1) { - output.writeMessage(1, (com.google.cloud.automl.v1beta1.GcsSource) source_); - } - if (sourceCase_ == 2) { - output.writeMessage(2, (com.google.cloud.automl.v1beta1.BigQuerySource) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.automl.v1beta1.GcsSource) source_); - } - if (sourceCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.automl.v1beta1.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.automl.v1beta1.BatchPredictInputConfig)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BatchPredictInputConfig other = - (com.google.cloud.automl.v1beta1.BatchPredictInputConfig) obj; - - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getGcsSource().equals(other.getGcsSource())) return false; - break; - case 2: - 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(); - switch (sourceCase_) { - case 1: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 2: - 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.automl.v1beta1.BatchPredictInputConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.BatchPredictInputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Input configuration for BatchPredict Action.
-   * The format of input depends on the ML problem of the model used for
-   * prediction. As input source the
-   * [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
-   * is expected, unless specified otherwise.
-   * The formats are represented in EBNF with commas being literal and with
-   * non-terminal symbols defined near the end of this comment. The formats
-   * are:
-   *  *  For Image Classification:
-   *         CSV file(s) with each line having just a single column:
-   *           GCS_FILE_PATH
-   *           which leads to image of up to 30MB in size. Supported
-   *           extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
-   *           the Batch predict output.
-   *         Three sample rows:
-   *           gs://folder/image1.jpeg
-   *           gs://folder/image2.gif
-   *           gs://folder/image3.png
-   *  *  For Image Object Detection:
-   *         CSV file(s) with each line having just a single column:
-   *           GCS_FILE_PATH
-   *           which leads to image of up to 30MB in size. Supported
-   *           extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in
-   *           the Batch predict output.
-   *         Three sample rows:
-   *           gs://folder/image1.jpeg
-   *           gs://folder/image2.gif
-   *           gs://folder/image3.png
-   *  *  For Video Classification:
-   *         CSV file(s) with each line in format:
-   *           GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
-   *           GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
-   *           duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
-   *           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
-   *           length of the video, and end has to be after the start.
-   *         Three sample rows:
-   *           gs://folder/video1.mp4,10,40
-   *           gs://folder/video1.mp4,20,60
-   *           gs://folder/vid2.mov,0,inf
-   *  *  For Video Object Tracking:
-   *         CSV file(s) with each line in format:
-   *           GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END
-   *           GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h
-   *           duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
-   *           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
-   *           length of the video, and end has to be after the start.
-   *         Three sample rows:
-   *           gs://folder/video1.mp4,10,240
-   *           gs://folder/video1.mp4,300,360
-   *           gs://folder/vid2.mov,0,inf
-   *  *  For Text Classification:
-   *         CSV file(s) with each line having just a single column:
-   *           GCS_FILE_PATH | TEXT_SNIPPET
-   *         Any given text file can have size upto 128kB.
-   *         Any given text snippet content must have 60,000 characters or less.
-   *         Three sample rows:
-   *           gs://folder/text1.txt
-   *           "Some text content to predict"
-   *           gs://folder/text3.pdf
-   *         Supported file extensions: .txt, .pdf
-   *  *  For Text Sentiment:
-   *         CSV file(s) with each line having just a single column:
-   *           GCS_FILE_PATH | TEXT_SNIPPET
-   *         Any given text file can have size upto 128kB.
-   *         Any given text snippet content must have 500 characters or less.
-   *         Three sample rows:
-   *           gs://folder/text1.txt
-   *           "Some text content to predict"
-   *           gs://folder/text3.pdf
-   *         Supported file extensions: .txt, .pdf
-   *  * For Text Extraction
-   *         .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or
-   *         as documents (for a single BatchPredict call only one of the these
-   *         formats may be used).
-   *         The in-line .JSONL file(s) contain per line a proto that
-   *           wraps a temporary user-assigned TextSnippet ID (string up to 2000
-   *           characters long) called "id", a TextSnippet proto (in
-   *           json representation) and zero or more TextFeature protos. Any given
-   *           text snippet content must have 30,000 characters or less, and also
-   *           be UTF-8 NFC encoded (ASCII already is). The IDs provided should be
-   *           unique.
-   *         The document .JSONL file(s) contain, per line, a proto that wraps a
-   *           Document proto with input_config set. Only PDF documents are
-   *           supported now, and each document must be up to 2MB large.
-   *         Any given .JSONL file must be 100MB or smaller, and no more than 20
-   *         files may be given.
-   *         Sample in-line JSON Lines file (presented here with artificial line
-   *         breaks, but the only actual line break is denoted by \n):
-   *           {
-   *             "id": "my_first_id",
-   *             "text_snippet": { "content": "dog car cat"},
-   *             "text_features": [
-   *               {
-   *                 "text_segment": {"start_offset": 4, "end_offset": 6},
-   *                 "structural_type": PARAGRAPH,
-   *                 "bounding_poly": {
-   *                   "normalized_vertices": [
-   *                     {"x": 0.1, "y": 0.1},
-   *                     {"x": 0.1, "y": 0.3},
-   *                     {"x": 0.3, "y": 0.3},
-   *                     {"x": 0.3, "y": 0.1},
-   *                   ]
-   *                 },
-   *               }
-   *             ],
-   *           }\n
-   *           {
-   *             "id": "2",
-   *             "text_snippet": {
-   *               "content": "An elaborate content",
-   *               "mime_type": "text/plain"
-   *             }
-   *           }
-   *         Sample document JSON Lines file (presented here with artificial line
-   *         breaks, but the only actual line break is denoted by \n).:
-   *           {
-   *             "document": {
-   *               "input_config": {
-   *                 "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
-   *                 }
-   *               }
-   *             }
-   *           }\n
-   *           {
-   *             "document": {
-   *               "input_config": {
-   *                 "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
-   *                 }
-   *               }
-   *             }
-   *           }
-   *  *  For Tables:
-   *         Either
-   *         [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
-   * [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source].
-   *         GCS case:
-   *           CSV file(s), each by itself 10GB or smaller and total size must be
-   *           100GB or smaller, where first file must have a header containing
-   *           column names. If the first row of a subsequent file is the same as
-   *           the header, then it is also treated as a header. All other rows
-   *           contain values for the corresponding columns.
-   *           The column names must contain the model's
-   * [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
-   *           (order doesn't matter). The columns corresponding to the model's
-   *           input feature column specs must contain values compatible with the
-   *           column spec's data types. Prediction on all the rows, i.e. the CSV
-   *           lines, will be attempted. For FORECASTING
-   * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
-   *           all columns having
-   * [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
-   *           type will be ignored.
-   *           First three sample rows of a CSV file:
-   *             "First Name","Last Name","Dob","Addresses"
-   * "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
-   * "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
-   *         BigQuery case:
-   *           An URI of a BigQuery table. The user data size of the BigQuery
-   *           table must be 100GB or smaller.
-   *           The column names must contain the model's
-   * [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
-   *           (order doesn't matter). The columns corresponding to the model's
-   *           input feature column specs must contain values compatible with the
-   *           column spec's data types. Prediction on all the rows of the table
-   *           will be attempted. For FORECASTING
-   * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
-   *           all columns having
-   * [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType]
-   *           type will be ignored.
-   *  Definitions:
-   *  GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi".
-   *  TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
-   *                 double quotes ("")
-   *  TIME_SEGMENT_START = TIME_OFFSET
-   *                       Expresses a beginning, inclusive, of a time segment
-   *                       within an
-   *                       example that has a time dimension (e.g. video).
-   *  TIME_SEGMENT_END = TIME_OFFSET
-   *                     Expresses an end, exclusive, of a time segment within
-   *                     an example that has a time dimension (e.g. video).
-   *  TIME_OFFSET = A number of seconds as measured from the start of an
-   *                example (e.g. video). Fractions are allowed, up to a
-   *                microsecond precision. "inf" is allowed and it means the end
-   *                of the example.
-   *  Errors:
-   *  If any of the provided CSV files can't be parsed or if more than certain
-   *  percent of CSV rows cannot be processed then the operation fails and
-   *  prediction does not happen. Regardless of overall success or failure the
-   *  per-row failures, up to a certain count cap, will be listed in
-   *  Operation.metadata.partial_failures.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictInputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BatchPredictInputConfig) - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.class, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.BatchPredictInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig build() { - com.google.cloud.automl.v1beta1.BatchPredictInputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig buildPartial() { - com.google.cloud.automl.v1beta1.BatchPredictInputConfig result = - new com.google.cloud.automl.v1beta1.BatchPredictInputConfig(this); - if (sourceCase_ == 1) { - if (gcsSourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = gcsSourceBuilder_.build(); - } - } - if (sourceCase_ == 2) { - if (bigquerySourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = bigquerySourceBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.BatchPredictInputConfig) { - return mergeFrom((com.google.cloud.automl.v1beta1.BatchPredictInputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BatchPredictInputConfig other) { - if (other == com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance()) - return this; - 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.automl.v1beta1.BatchPredictInputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BatchPredictInputConfig) 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.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder> - gcsSourceBuilder_; - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - public com.google.cloud.automl.v1beta1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.automl.v1beta1.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.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.automl.v1beta1.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.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.automl.v1beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1 - && source_ != com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance()) { - source_ = - com.google.cloud.automl.v1beta1.GcsSource.newBuilder( - (com.google.cloud.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSource.Builder getGcsSourceBuilder() { - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder>( - (com.google.cloud.automl.v1beta1.GcsSource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged(); - ; - return gcsSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQuerySource, - com.google.cloud.automl.v1beta1.BigQuerySource.Builder, - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder> - bigquerySourceBuilder_; - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - * - * @return Whether the bigquerySource field is set. - */ - public boolean hasBigquerySource() { - return sourceCase_ == 2; - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - * - * @return The bigquerySource. - */ - public com.google.cloud.automl.v1beta1.BigQuerySource getBigquerySource() { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } else { - if (sourceCase_ == 2) { - return bigquerySourceBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - public Builder setBigquerySource(com.google.cloud.automl.v1beta1.BigQuerySource value) { - if (bigquerySourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - bigquerySourceBuilder_.setMessage(value); - } - sourceCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - public Builder setBigquerySource( - com.google.cloud.automl.v1beta1.BigQuerySource.Builder builderForValue) { - if (bigquerySourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - bigquerySourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - public Builder mergeBigquerySource(com.google.cloud.automl.v1beta1.BigQuerySource value) { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 2 - && source_ != com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance()) { - source_ = - com.google.cloud.automl.v1beta1.BigQuerySource.newBuilder( - (com.google.cloud.automl.v1beta1.BigQuerySource) source_) - .mergeFrom(value) - .buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 2) { - bigquerySourceBuilder_.mergeFrom(value); - } - bigquerySourceBuilder_.setMessage(value); - } - sourceCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - public Builder clearBigquerySource() { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 2) { - sourceCase_ = 0; - source_ = null; - } - bigquerySourceBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - public com.google.cloud.automl.v1beta1.BigQuerySource.Builder getBigquerySourceBuilder() { - return getBigquerySourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - public com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { - if ((sourceCase_ == 2) && (bigquerySourceBuilder_ != null)) { - return bigquerySourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQuerySource, - com.google.cloud.automl.v1beta1.BigQuerySource.Builder, - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder> - getBigquerySourceFieldBuilder() { - if (bigquerySourceBuilder_ == null) { - if (!(sourceCase_ == 2)) { - source_ = com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - bigquerySourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQuerySource, - com.google.cloud.automl.v1beta1.BigQuerySource.Builder, - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder>( - (com.google.cloud.automl.v1beta1.BigQuerySource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 2; - onChanged(); - ; - return bigquerySourceBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.BatchPredictInputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BatchPredictInputConfig) - private static final com.google.cloud.automl.v1beta1.BatchPredictInputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BatchPredictInputConfig(); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictInputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchPredictInputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchPredictInputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfigOrBuilder.java deleted file mode 100644 index 3ef53c40c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictInputConfigOrBuilder.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface BatchPredictInputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BatchPredictInputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - com.google.cloud.automl.v1beta1.GcsSource getGcsSource(); - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - * - * @return Whether the bigquerySource field is set. - */ - boolean hasBigquerySource(); - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - * - * @return The bigquerySource. - */ - com.google.cloud.automl.v1beta1.BigQuerySource getBigquerySource(); - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 2; - */ - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder(); - - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig.SourceCase getSourceCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadata.java deleted file mode 100644 index 7a21fe573..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadata.java +++ /dev/null @@ -1,2142 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of BatchPredict operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictOperationMetadata} - */ -public final class BatchPredictOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BatchPredictOperationMetadata) - BatchPredictOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchPredictOperationMetadata.newBuilder() to construct. - private BatchPredictOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchPredictOperationMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchPredictOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchPredictOperationMetadata( - 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.automl.v1beta1.BatchPredictInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .Builder - subBuilder = null; - if (outputInfo_ != null) { - subBuilder = outputInfo_.toBuilder(); - } - outputInfo_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo.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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.class, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder.class); - } - - public interface BatchPredictOutputInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the prediction output is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The gcsOutputDirectory. - */ - java.lang.String getGcsOutputDirectory(); - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the prediction output is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The bytes for gcsOutputDirectory. - */ - com.google.protobuf.ByteString getGcsOutputDirectoryBytes(); - - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the prediction output is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bigqueryOutputDataset. - */ - java.lang.String getBigqueryOutputDataset(); - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the prediction output is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bytes for bigqueryOutputDataset. - */ - com.google.protobuf.ByteString getBigqueryOutputDatasetBytes(); - - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .OutputLocationCase - getOutputLocationCase(); - } - /** - * - * - *
-   * Further describes this batch predict's output.
-   * Supplements
-   * [BatchPredictOutputConfig][google.cloud.automl.v1beta1.BatchPredictOutputConfig].
-   * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} - */ - public static final class BatchPredictOutputInfo extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - BatchPredictOutputInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchPredictOutputInfo.newBuilder() to construct. - private BatchPredictOutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchPredictOutputInfo() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchPredictOutputInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchPredictOutputInfo( - 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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .class, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .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; - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the prediction output is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - } - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the prediction output is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @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; - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the prediction output is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @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; - } - } - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the prediction output is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo other = - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - 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.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 batch predict's output.
-     * Supplements
-     * [BatchPredictOutputConfig][google.cloud.automl.v1beta1.BatchPredictOutputConfig].
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .class, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - build() { - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - buildPartial() { - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - result = - new com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo(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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - other) { - if (other - == com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - 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; - } - - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the prediction output is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @return The gcsOutputDirectory. - */ - 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; - } - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the prediction output is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @return The bytes for gcsOutputDirectory. - */ - 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; - } - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the prediction output is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the prediction output is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @return This builder for chaining. - */ - public Builder clearGcsOutputDirectory() { - if (outputLocationCase_ == 1) { - outputLocationCase_ = 0; - outputLocation_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the prediction output is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the prediction output is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bigqueryOutputDataset. - */ - 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; - } - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the prediction output is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bytes for bigqueryOutputDataset. - */ - 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; - } - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the prediction output is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @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; - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the prediction output is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return This builder for chaining. - */ - public Builder clearBigqueryOutputDataset() { - if (outputLocationCase_ == 2) { - outputLocationCase_ = 0; - outputLocation_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the prediction output is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @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.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo) - private static final com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo(); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchPredictOutputInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchPredictOutputInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.BatchPredictInputConfig inputConfig_; - /** - * - * - *
-   * Output only. The input config that was given upon starting this
-   * batch predict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - * - * - *
-   * Output only. The input config that was given upon starting this
-   * batch predict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig getInputConfig() { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance() - : inputConfig_; - } - /** - * - * - *
-   * Output only. The input config that was given upon starting this
-   * batch predict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder - getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int OUTPUT_INFO_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - outputInfo_; - /** - * - * - *
-   * Output only. Information further describing this batch predict's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - public boolean hasOutputInfo() { - return outputInfo_ != null; - } - /** - * - * - *
-   * Output only. Information further describing this batch predict's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - getOutputInfo() { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .getDefaultInstance() - : outputInfo_; - } - /** - * - * - *
-   * Output only. Information further describing this batch predict's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfoOrBuilder - 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 (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - 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 (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputConfig()); - } - 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.automl.v1beta1.BatchPredictOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata other = - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig().equals(other.getInputConfig())) 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 (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().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.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 BatchPredict operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BatchPredictOperationMetadata) - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.class, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = 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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata build() { - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata result = - new com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata(this); - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.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.automl.v1beta1.BatchPredictOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance()) - return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - 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.automl.v1beta1.BatchPredictOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.BatchPredictInputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictInputConfig, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder> - inputConfigBuilder_; - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance() - : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.automl.v1beta1.BatchPredictInputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.automl.v1beta1.BatchPredictInputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.newBuilder(inputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder - getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance() - : inputConfig_; - } - } - /** - * - * - *
-     * Output only. The input config that was given upon starting this
-     * batch predict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictInputConfig, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictInputConfig, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder>( - getInputConfig(), getParentForChildren(), isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - outputInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfoOrBuilder> - outputInfoBuilder_; - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - public boolean hasOutputInfo() { - return outputInfoBuilder_ != null || outputInfo_ != null; - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - getOutputInfo() { - if (outputInfoBuilder_ == null) { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .getDefaultInstance() - : outputInfo_; - } else { - return outputInfoBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - value) { - if (outputInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputInfo_ = value; - onChanged(); - } else { - outputInfoBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo.Builder - builderForValue) { - if (outputInfoBuilder_ == null) { - outputInfo_ = builderForValue.build(); - onChanged(); - } else { - outputInfoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - public Builder mergeOutputInfo( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - value) { - if (outputInfoBuilder_ == null) { - if (outputInfo_ != null) { - outputInfo_ = - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .newBuilder(outputInfo_) - .mergeFrom(value) - .buildPartial(); - } else { - outputInfo_ = value; - } - onChanged(); - } else { - outputInfoBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - public Builder clearOutputInfo() { - if (outputInfoBuilder_ == null) { - outputInfo_ = null; - onChanged(); - } else { - outputInfo_ = null; - outputInfoBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .Builder - getOutputInfoBuilder() { - - onChanged(); - return getOutputInfoFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfoOrBuilder - getOutputInfoOrBuilder() { - if (outputInfoBuilder_ != null) { - return outputInfoBuilder_.getMessageOrBuilder(); - } else { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .getDefaultInstance() - : outputInfo_; - } - } - /** - * - * - *
-     * Output only. Information further describing this batch predict's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfoOrBuilder> - getOutputInfoFieldBuilder() { - if (outputInfoBuilder_ == null) { - outputInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfo, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .BatchPredictOutputInfoOrBuilder>( - 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.automl.v1beta1.BatchPredictOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BatchPredictOperationMetadata) - private static final com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchPredictOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchPredictOperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadataOrBuilder.java deleted file mode 100644 index 659f54779..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOperationMetadataOrBuilder.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface BatchPredictOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BatchPredictOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The input config that was given upon starting this
-   * batch predict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - * - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - * - * - *
-   * Output only. The input config that was given upon starting this
-   * batch predict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - * - * @return The inputConfig. - */ - com.google.cloud.automl.v1beta1.BatchPredictInputConfig getInputConfig(); - /** - * - * - *
-   * Output only. The input config that was given upon starting this
-   * batch predict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 1; - */ - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder getInputConfigOrBuilder(); - - /** - * - * - *
-   * Output only. Information further describing this batch predict's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - boolean hasOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing this batch predict's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo - getOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing this batch predict's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfo output_info = 2; - * - */ - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.BatchPredictOutputInfoOrBuilder - getOutputInfoOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfig.java deleted file mode 100644 index 376295d0e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfig.java +++ /dev/null @@ -1,1634 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Output configuration for BatchPredict Action.
- * As destination the
- * [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
- * must be set unless specified otherwise for a domain. If gcs_destination is
- * set then in the given directory a new directory is created. Its name
- * will be
- * "prediction-<model-display-name>-<timestamp-of-prediction-call>",
- * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents
- * of it depends on the ML problem the predictions are made for.
- *  *  For Image Classification:
- *         In the created directory files `image_classification_1.jsonl`,
- *         `image_classification_2.jsonl`,...,`image_classification_N.jsonl`
- *         will be created, where N may be 1, and depends on the
- *         total number of the successfully predicted images and annotations.
- *         A single image will be listed only once with all its annotations,
- *         and its annotations will never be split across files.
- *         Each .JSONL file will contain, per line, a JSON representation of a
- *         proto that wraps image's "ID" : "<id_value>" followed by a list of
- *         zero or more AnnotationPayload protos (called annotations), which
- *         have classification detail populated.
- *         If prediction for any image failed (partially or completely), then an
- *         additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
- *         files will be created (N depends on total number of failed
- *         predictions). These files will have a JSON representation of a proto
- *         that wraps the same "ID" : "<id_value>" but here followed by
- *         exactly one
- * [`google.rpc.Status`](https:
- * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
- *         containing only `code` and `message`fields.
- *  *  For Image Object Detection:
- *         In the created directory files `image_object_detection_1.jsonl`,
- *         `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl`
- *         will be created, where N may be 1, and depends on the
- *         total number of the successfully predicted images and annotations.
- *         Each .JSONL file will contain, per line, a JSON representation of a
- *         proto that wraps image's "ID" : "<id_value>" followed by a list of
- *         zero or more AnnotationPayload protos (called annotations), which
- *         have image_object_detection detail populated. A single image will
- *         be listed only once with all its annotations, and its annotations
- *         will never be split across files.
- *         If prediction for any image failed (partially or completely), then
- *         additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
- *         files will be created (N depends on total number of failed
- *         predictions). These files will have a JSON representation of a proto
- *         that wraps the same "ID" : "<id_value>" but here followed by
- *         exactly one
- * [`google.rpc.Status`](https:
- * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
- *         containing only `code` and `message`fields.
- *  *  For Video Classification:
- *         In the created directory a video_classification.csv file, and a .JSON
- *         file per each video classification requested in the input (i.e. each
- *         line in given CSV(s)), will be created.
- *         The format of video_classification.csv is:
- * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
- *         where:
- *         GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
- *             the prediction input lines (i.e. video_classification.csv has
- *             precisely the same number of lines as the prediction input had.)
- *         JSON_FILE_NAME = Name of .JSON file in the output directory, which
- *             contains prediction responses for the video time segment.
- *         STATUS = "OK" if prediction completed successfully, or an error code
- *             with message otherwise. If STATUS is not "OK" then the .JSON file
- *             for that line may not exist or be empty.
- *         Each .JSON file, assuming STATUS is "OK", will contain a list of
- *         AnnotationPayload protos in JSON format, which are the predictions
- *         for the video time segment the file is assigned to in the
- *         video_classification.csv. All AnnotationPayload protos will have
- *         video_classification field set, and will be sorted by
- *         video_classification.type field (note that the returned types are
- *         governed by `classifaction_types` parameter in
- *         [PredictService.BatchPredictRequest.params][]).
- *  *  For Video Object Tracking:
- *         In the created directory a video_object_tracking.csv file will be
- *         created, and multiple files video_object_trackinng_1.json,
- *         video_object_trackinng_2.json,..., video_object_trackinng_N.json,
- *         where N is the number of requests in the input (i.e. the number of
- *         lines in given CSV(s)).
- *         The format of video_object_tracking.csv is:
- * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
- *         where:
- *         GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
- *             the prediction input lines (i.e. video_object_tracking.csv has
- *             precisely the same number of lines as the prediction input had.)
- *         JSON_FILE_NAME = Name of .JSON file in the output directory, which
- *             contains prediction responses for the video time segment.
- *         STATUS = "OK" if prediction completed successfully, or an error
- *             code with message otherwise. If STATUS is not "OK" then the .JSON
- *             file for that line may not exist or be empty.
- *         Each .JSON file, assuming STATUS is "OK", will contain a list of
- *         AnnotationPayload protos in JSON format, which are the predictions
- *         for each frame of the video time segment the file is assigned to in
- *         video_object_tracking.csv. All AnnotationPayload protos will have
- *         video_object_tracking field set.
- *  *  For Text Classification:
- *         In the created directory files `text_classification_1.jsonl`,
- *         `text_classification_2.jsonl`,...,`text_classification_N.jsonl`
- *         will be created, where N may be 1, and depends on the
- *         total number of inputs and annotations found.
- *         Each .JSONL file will contain, per line, a JSON representation of a
- *         proto that wraps input text snippet or input text file and a list of
- *         zero or more AnnotationPayload protos (called annotations), which
- *         have classification detail populated. A single text snippet or file
- *         will be listed only once with all its annotations, and its
- *         annotations will never be split across files.
- *         If prediction for any text snippet or file failed (partially or
- *         completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
- *         `errors_N.jsonl` files will be created (N depends on total number of
- *         failed predictions). These files will have a JSON representation of a
- *         proto that wraps input text snippet or input text file followed by
- *         exactly one
- * [`google.rpc.Status`](https:
- * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
- *         containing only `code` and `message`.
- *  *  For Text Sentiment:
- *         In the created directory files `text_sentiment_1.jsonl`,
- *         `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl`
- *         will be created, where N may be 1, and depends on the
- *         total number of inputs and annotations found.
- *         Each .JSONL file will contain, per line, a JSON representation of a
- *         proto that wraps input text snippet or input text file and a list of
- *         zero or more AnnotationPayload protos (called annotations), which
- *         have text_sentiment detail populated. A single text snippet or file
- *         will be listed only once with all its annotations, and its
- *         annotations will never be split across files.
- *         If prediction for any text snippet or file failed (partially or
- *         completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
- *         `errors_N.jsonl` files will be created (N depends on total number of
- *         failed predictions). These files will have a JSON representation of a
- *         proto that wraps input text snippet or input text file followed by
- *         exactly one
- * [`google.rpc.Status`](https:
- * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
- *         containing only `code` and `message`.
- *   *  For Text Extraction:
- *         In the created directory files `text_extraction_1.jsonl`,
- *         `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl`
- *         will be created, where N may be 1, and depends on the
- *         total number of inputs and annotations found.
- *         The contents of these .JSONL file(s) depend on whether the input
- *         used inline text, or documents.
- *         If input was inline, then each .JSONL file will contain, per line,
- *           a JSON representation of a proto that wraps given in request text
- *           snippet's "id" (if specified), followed by input text snippet,
- *           and a list of zero or more
- *           AnnotationPayload protos (called annotations), which have
- *           text_extraction detail populated. A single text snippet will be
- *           listed only once with all its annotations, and its annotations will
- *           never be split across files.
- *         If input used documents, then each .JSONL file will contain, per
- *           line, a JSON representation of a proto that wraps given in request
- *           document proto, followed by its OCR-ed representation in the form
- *           of a text snippet, finally followed by a list of zero or more
- *           AnnotationPayload protos (called annotations), which have
- *           text_extraction detail populated and refer, via their indices, to
- *           the OCR-ed text snippet. A single document (and its text snippet)
- *           will be listed only once with all its annotations, and its
- *           annotations will never be split across files.
- *         If prediction for any text snippet failed (partially or completely),
- *         then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
- *         `errors_N.jsonl` files will be created (N depends on total number of
- *         failed predictions). These files will have a JSON representation of a
- *         proto that wraps either the "id" : "<id_value>" (in case of inline)
- *         or the document proto (in case of document) but here followed by
- *         exactly one
- * [`google.rpc.Status`](https:
- * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
- *         containing only `code` and `message`.
- *  *  For Tables:
- *         Output depends on whether
- * [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
- *         or
- * [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination]
- *         is set (either is allowed).
- *         GCS case:
- *           In the created directory files `tables_1.csv`, `tables_2.csv`,...,
- *           `tables_N.csv` will be created, where N may be 1, and depends on
- *           the total number of the successfully predicted rows.
- *           For all CLASSIFICATION
- * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
- *             Each .csv file will contain a header, listing all columns'
- * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
- *             given on input followed by M target column names in the format of
- * "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
- * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>_<target
- *             value>_score" where M is the number of distinct target values,
- *             i.e. number of distinct values in the target column of the table
- *             used to train the model. Subsequent lines will contain the
- *             respective values of successfully predicted rows, with the last,
- *             i.e. the target, columns having the corresponding prediction
- *             [scores][google.cloud.automl.v1beta1.TablesAnnotation.score].
- *           For REGRESSION and FORECASTING
- * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
- *             Each .csv file will contain a header, listing all columns'
- *             [display_name-s][google.cloud.automl.v1beta1.display_name] given
- *             on input followed by the predicted target column with name in the
- *             format of
- * "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
- * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
- *             Subsequent lines will contain the respective values of
- *             successfully predicted rows, with the last, i.e. the target,
- *             column having the predicted target value.
- *             If prediction for any rows failed, then an additional
- *             `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be
- *             created (N depends on total number of failed rows). These files
- *             will have analogous format as `tables_*.csv`, but always with a
- *             single target column having
- * [`google.rpc.Status`](https:
- * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
- *             represented as a JSON string, and containing only `code` and
- *             `message`.
- *         BigQuery case:
- * [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
- *           pointing to a BigQuery project must be set. In the given project a
- *           new dataset will be created with name
- *           `prediction_<model-display-name>_<timestamp-of-prediction-call>`
- *           where <model-display-name> will be made
- *           BigQuery-dataset-name compatible (e.g. most special characters will
- *           become underscores), and timestamp will be in
- *           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
- *           two tables will be created, `predictions`, and `errors`.
- *           The `predictions` table's column names will be the input columns'
- * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
- *           followed by the target column with name in the format of
- * "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
- * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
- *           The input feature columns will contain the respective values of
- *           successfully predicted rows, with the target column having an
- *           ARRAY of
- * [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
- *           represented as STRUCT-s, containing
- *           [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
- *           The `errors` table contains rows for which the prediction has
- *           failed, it has analogous input columns while the target column name
- *           is in the format of
- * "errors_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
- * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>",
- *           and as a value has
- * [`google.rpc.Status`](https:
- * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
- *           represented as a STRUCT, and containing only `code` and `message`.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictOutputConfig} - */ -public final class BatchPredictOutputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BatchPredictOutputConfig) - BatchPredictOutputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchPredictOutputConfig.newBuilder() to construct. - private BatchPredictOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchPredictOutputConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchPredictOutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchPredictOutputConfig( - 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.automl.v1beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.automl.v1beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.automl.v1beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = - ((com.google.cloud.automl.v1beta1.BigQueryDestination) destination_) - .toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BigQueryDestination.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.class, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.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), - BIGQUERY_DESTINATION(2), - 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 2: - 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 = 1; - /** - * - * - *
-   * The Google Cloud Storage location of the directory where the output is to
-   * be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-   * The Google Cloud Storage location of the directory where the output is to
-   * be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - /** - * - * - *
-   * The Google Cloud Storage location of the directory where the output is to
-   * be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination() { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.automl.v1beta1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - output.writeMessage(2, (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.automl.v1beta1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.automl.v1beta1.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.automl.v1beta1.BatchPredictOutputConfig)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig other = - (com.google.cloud.automl.v1beta1.BatchPredictOutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination().equals(other.getGcsDestination())) return false; - break; - case 2: - 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(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 2: - 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.automl.v1beta1.BatchPredictOutputConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 BatchPredict Action.
-   * As destination the
-   * [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
-   * must be set unless specified otherwise for a domain. If gcs_destination is
-   * set then in the given directory a new directory is created. Its name
-   * will be
-   * "prediction-<model-display-name>-<timestamp-of-prediction-call>",
-   * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents
-   * of it depends on the ML problem the predictions are made for.
-   *  *  For Image Classification:
-   *         In the created directory files `image_classification_1.jsonl`,
-   *         `image_classification_2.jsonl`,...,`image_classification_N.jsonl`
-   *         will be created, where N may be 1, and depends on the
-   *         total number of the successfully predicted images and annotations.
-   *         A single image will be listed only once with all its annotations,
-   *         and its annotations will never be split across files.
-   *         Each .JSONL file will contain, per line, a JSON representation of a
-   *         proto that wraps image's "ID" : "<id_value>" followed by a list of
-   *         zero or more AnnotationPayload protos (called annotations), which
-   *         have classification detail populated.
-   *         If prediction for any image failed (partially or completely), then an
-   *         additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
-   *         files will be created (N depends on total number of failed
-   *         predictions). These files will have a JSON representation of a proto
-   *         that wraps the same "ID" : "<id_value>" but here followed by
-   *         exactly one
-   * [`google.rpc.Status`](https:
-   * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
-   *         containing only `code` and `message`fields.
-   *  *  For Image Object Detection:
-   *         In the created directory files `image_object_detection_1.jsonl`,
-   *         `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl`
-   *         will be created, where N may be 1, and depends on the
-   *         total number of the successfully predicted images and annotations.
-   *         Each .JSONL file will contain, per line, a JSON representation of a
-   *         proto that wraps image's "ID" : "<id_value>" followed by a list of
-   *         zero or more AnnotationPayload protos (called annotations), which
-   *         have image_object_detection detail populated. A single image will
-   *         be listed only once with all its annotations, and its annotations
-   *         will never be split across files.
-   *         If prediction for any image failed (partially or completely), then
-   *         additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl`
-   *         files will be created (N depends on total number of failed
-   *         predictions). These files will have a JSON representation of a proto
-   *         that wraps the same "ID" : "<id_value>" but here followed by
-   *         exactly one
-   * [`google.rpc.Status`](https:
-   * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
-   *         containing only `code` and `message`fields.
-   *  *  For Video Classification:
-   *         In the created directory a video_classification.csv file, and a .JSON
-   *         file per each video classification requested in the input (i.e. each
-   *         line in given CSV(s)), will be created.
-   *         The format of video_classification.csv is:
-   * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
-   *         where:
-   *         GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
-   *             the prediction input lines (i.e. video_classification.csv has
-   *             precisely the same number of lines as the prediction input had.)
-   *         JSON_FILE_NAME = Name of .JSON file in the output directory, which
-   *             contains prediction responses for the video time segment.
-   *         STATUS = "OK" if prediction completed successfully, or an error code
-   *             with message otherwise. If STATUS is not "OK" then the .JSON file
-   *             for that line may not exist or be empty.
-   *         Each .JSON file, assuming STATUS is "OK", will contain a list of
-   *         AnnotationPayload protos in JSON format, which are the predictions
-   *         for the video time segment the file is assigned to in the
-   *         video_classification.csv. All AnnotationPayload protos will have
-   *         video_classification field set, and will be sorted by
-   *         video_classification.type field (note that the returned types are
-   *         governed by `classifaction_types` parameter in
-   *         [PredictService.BatchPredictRequest.params][]).
-   *  *  For Video Object Tracking:
-   *         In the created directory a video_object_tracking.csv file will be
-   *         created, and multiple files video_object_trackinng_1.json,
-   *         video_object_trackinng_2.json,..., video_object_trackinng_N.json,
-   *         where N is the number of requests in the input (i.e. the number of
-   *         lines in given CSV(s)).
-   *         The format of video_object_tracking.csv is:
-   * GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS
-   *         where:
-   *         GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1
-   *             the prediction input lines (i.e. video_object_tracking.csv has
-   *             precisely the same number of lines as the prediction input had.)
-   *         JSON_FILE_NAME = Name of .JSON file in the output directory, which
-   *             contains prediction responses for the video time segment.
-   *         STATUS = "OK" if prediction completed successfully, or an error
-   *             code with message otherwise. If STATUS is not "OK" then the .JSON
-   *             file for that line may not exist or be empty.
-   *         Each .JSON file, assuming STATUS is "OK", will contain a list of
-   *         AnnotationPayload protos in JSON format, which are the predictions
-   *         for each frame of the video time segment the file is assigned to in
-   *         video_object_tracking.csv. All AnnotationPayload protos will have
-   *         video_object_tracking field set.
-   *  *  For Text Classification:
-   *         In the created directory files `text_classification_1.jsonl`,
-   *         `text_classification_2.jsonl`,...,`text_classification_N.jsonl`
-   *         will be created, where N may be 1, and depends on the
-   *         total number of inputs and annotations found.
-   *         Each .JSONL file will contain, per line, a JSON representation of a
-   *         proto that wraps input text snippet or input text file and a list of
-   *         zero or more AnnotationPayload protos (called annotations), which
-   *         have classification detail populated. A single text snippet or file
-   *         will be listed only once with all its annotations, and its
-   *         annotations will never be split across files.
-   *         If prediction for any text snippet or file failed (partially or
-   *         completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
-   *         `errors_N.jsonl` files will be created (N depends on total number of
-   *         failed predictions). These files will have a JSON representation of a
-   *         proto that wraps input text snippet or input text file followed by
-   *         exactly one
-   * [`google.rpc.Status`](https:
-   * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
-   *         containing only `code` and `message`.
-   *  *  For Text Sentiment:
-   *         In the created directory files `text_sentiment_1.jsonl`,
-   *         `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl`
-   *         will be created, where N may be 1, and depends on the
-   *         total number of inputs and annotations found.
-   *         Each .JSONL file will contain, per line, a JSON representation of a
-   *         proto that wraps input text snippet or input text file and a list of
-   *         zero or more AnnotationPayload protos (called annotations), which
-   *         have text_sentiment detail populated. A single text snippet or file
-   *         will be listed only once with all its annotations, and its
-   *         annotations will never be split across files.
-   *         If prediction for any text snippet or file failed (partially or
-   *         completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
-   *         `errors_N.jsonl` files will be created (N depends on total number of
-   *         failed predictions). These files will have a JSON representation of a
-   *         proto that wraps input text snippet or input text file followed by
-   *         exactly one
-   * [`google.rpc.Status`](https:
-   * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
-   *         containing only `code` and `message`.
-   *   *  For Text Extraction:
-   *         In the created directory files `text_extraction_1.jsonl`,
-   *         `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl`
-   *         will be created, where N may be 1, and depends on the
-   *         total number of inputs and annotations found.
-   *         The contents of these .JSONL file(s) depend on whether the input
-   *         used inline text, or documents.
-   *         If input was inline, then each .JSONL file will contain, per line,
-   *           a JSON representation of a proto that wraps given in request text
-   *           snippet's "id" (if specified), followed by input text snippet,
-   *           and a list of zero or more
-   *           AnnotationPayload protos (called annotations), which have
-   *           text_extraction detail populated. A single text snippet will be
-   *           listed only once with all its annotations, and its annotations will
-   *           never be split across files.
-   *         If input used documents, then each .JSONL file will contain, per
-   *           line, a JSON representation of a proto that wraps given in request
-   *           document proto, followed by its OCR-ed representation in the form
-   *           of a text snippet, finally followed by a list of zero or more
-   *           AnnotationPayload protos (called annotations), which have
-   *           text_extraction detail populated and refer, via their indices, to
-   *           the OCR-ed text snippet. A single document (and its text snippet)
-   *           will be listed only once with all its annotations, and its
-   *           annotations will never be split across files.
-   *         If prediction for any text snippet failed (partially or completely),
-   *         then additional `errors_1.jsonl`, `errors_2.jsonl`,...,
-   *         `errors_N.jsonl` files will be created (N depends on total number of
-   *         failed predictions). These files will have a JSON representation of a
-   *         proto that wraps either the "id" : "<id_value>" (in case of inline)
-   *         or the document proto (in case of document) but here followed by
-   *         exactly one
-   * [`google.rpc.Status`](https:
-   * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
-   *         containing only `code` and `message`.
-   *  *  For Tables:
-   *         Output depends on whether
-   * [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination]
-   *         or
-   * [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination]
-   *         is set (either is allowed).
-   *         GCS case:
-   *           In the created directory files `tables_1.csv`, `tables_2.csv`,...,
-   *           `tables_N.csv` will be created, where N may be 1, and depends on
-   *           the total number of the successfully predicted rows.
-   *           For all CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
-   *             Each .csv file will contain a header, listing all columns'
-   * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
-   *             given on input followed by M target column names in the format of
-   * "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>_<target
-   *             value>_score" where M is the number of distinct target values,
-   *             i.e. number of distinct values in the target column of the table
-   *             used to train the model. Subsequent lines will contain the
-   *             respective values of successfully predicted rows, with the last,
-   *             i.e. the target, columns having the corresponding prediction
-   *             [scores][google.cloud.automl.v1beta1.TablesAnnotation.score].
-   *           For REGRESSION and FORECASTING
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]:
-   *             Each .csv file will contain a header, listing all columns'
-   *             [display_name-s][google.cloud.automl.v1beta1.display_name] given
-   *             on input followed by the predicted target column with name in the
-   *             format of
-   * "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
-   *             Subsequent lines will contain the respective values of
-   *             successfully predicted rows, with the last, i.e. the target,
-   *             column having the predicted target value.
-   *             If prediction for any rows failed, then an additional
-   *             `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be
-   *             created (N depends on total number of failed rows). These files
-   *             will have analogous format as `tables_*.csv`, but always with a
-   *             single target column having
-   * [`google.rpc.Status`](https:
-   * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
-   *             represented as a JSON string, and containing only `code` and
-   *             `message`.
-   *         BigQuery case:
-   * [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
-   *           pointing to a BigQuery project must be set. In the given project a
-   *           new dataset will be created with name
-   *           `prediction_<model-display-name>_<timestamp-of-prediction-call>`
-   *           where <model-display-name> will be made
-   *           BigQuery-dataset-name compatible (e.g. most special characters will
-   *           become underscores), and timestamp will be in
-   *           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
-   *           two tables will be created, `predictions`, and `errors`.
-   *           The `predictions` table's column names will be the input columns'
-   * [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name]
-   *           followed by the target column with name in the format of
-   * "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>"
-   *           The input feature columns will contain the respective values of
-   *           successfully predicted rows, with the target column having an
-   *           ARRAY of
-   * [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
-   *           represented as STRUCT-s, containing
-   *           [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
-   *           The `errors` table contains rows for which the prediction has
-   *           failed, it has analogous input columns while the target column name
-   *           is in the format of
-   * "errors_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>",
-   *           and as a value has
-   * [`google.rpc.Status`](https:
-   * //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
-   *           represented as a STRUCT, and containing only `code` and `message`.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictOutputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BatchPredictOutputConfig) - com.google.cloud.automl.v1beta1.BatchPredictOutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.class, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig build() { - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig buildPartial() { - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig result = - new com.google.cloud.automl.v1beta1.BatchPredictOutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - if (destinationCase_ == 2) { - if (bigqueryDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = bigqueryDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.BatchPredictOutputConfig) { - return mergeFrom((com.google.cloud.automl.v1beta1.BatchPredictOutputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BatchPredictOutputConfig other) { - if (other == com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.getDefaultInstance()) - return this; - 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.automl.v1beta1.BatchPredictOutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BatchPredictOutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder> - gcsDestinationBuilder_; - /** - * - * - *
-     * The Google Cloud Storage location of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-     * The Google Cloud Storage location of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.automl.v1beta1.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 of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.automl.v1beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.automl.v1beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 - && destination_ - != com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.automl.v1beta1.GcsDestination.newBuilder( - (com.google.cloud.automl.v1beta1.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 of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.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 of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The Google Cloud Storage location of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location of the directory where the output is to
-     * be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder>( - (com.google.cloud.automl.v1beta1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged(); - ; - return gcsDestinationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder> - bigqueryDestinationBuilder_; - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 2) { - return bigqueryDestinationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder mergeBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2 - && destination_ - != com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.automl.v1beta1.BigQueryDestination.newBuilder( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 2) { - bigqueryDestinationBuilder_.mergeFrom(value); - } - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - } - bigqueryDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination.Builder - getBigqueryDestinationBuilder() { - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - if (!(destinationCase_ == 2)) { - destination_ = com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - bigqueryDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder>( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 2; - onChanged(); - ; - return bigqueryDestinationBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.BatchPredictOutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BatchPredictOutputConfig) - private static final com.google.cloud.automl.v1beta1.BatchPredictOutputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BatchPredictOutputConfig(); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictOutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchPredictOutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchPredictOutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfigOrBuilder.java deleted file mode 100644 index 5d0e5537a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictOutputConfigOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface BatchPredictOutputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BatchPredictOutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Google Cloud Storage location of the directory where the output is to
-   * be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - * - * - *
-   * The Google Cloud Storage location of the directory where the output is to
-   * be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination(); - /** - * - * - *
-   * The Google Cloud Storage location of the directory where the output is to
-   * be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination(); - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); - - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.DestinationCase - getDestinationCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequest.java deleted file mode 100644 index 222a30dea..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequest.java +++ /dev/null @@ -1,2207 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictRequest} - */ -public final class BatchPredictRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BatchPredictRequest) - BatchPredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchPredictRequest.newBuilder() to construct. - private BatchPredictRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchPredictRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchPredictRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchPredictRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = - com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put(params__.getKey(), params__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictRequest.class, - com.google.cloud.automl.v1beta1.BatchPredictRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Name of the model requested to serve the batch prediction.
-   * 
- * - * - * 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) { - 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 model requested to serve the batch prediction.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.BatchPredictInputConfig inputConfig_; - /** - * - * - *
-   * Required. The input configuration for batch prediction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - * - * - *
-   * Required. The input configuration for batch prediction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig getInputConfig() { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance() - : inputConfig_; - } - /** - * - * - *
-   * Required. The input configuration for batch prediction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder - getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4; - private com.google.cloud.automl.v1beta1.BatchPredictOutputConfig outputConfig_; - /** - * - * - *
-   * Required. The Configuration specifying where output predictions should
-   * be written.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Required. The Configuration specifying where output predictions should
-   * be written.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Required. The Configuration specifying where output predictions should
-   * be written.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfigOrBuilder - getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - public static final int PARAMS_FIELD_NUMBER = 5; - - private static final class ParamsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_ParamsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (inputConfig_ != null) { - output.writeMessage(3, getInputConfig()); - } - if (outputConfig_ != null) { - output.writeMessage(4, getOutputConfig()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 5); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInputConfig()); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOutputConfig()); - } - for (java.util.Map.Entry entry : - internalGetParams().getMap().entrySet()) { - com.google.protobuf.MapEntry params__ = - ParamsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, params__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.BatchPredictRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BatchPredictRequest other = - (com.google.cloud.automl.v1beta1.BatchPredictRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig().equals(other.getInputConfig())) return false; - } - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig().equals(other.getOutputConfig())) return false; - } - if (!internalGetParams().equals(other.internalGetParams())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - if (!internalGetParams().getMap().isEmpty()) { - hash = (37 * hash) + PARAMS_FIELD_NUMBER; - hash = (53 * hash) + internalGetParams().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.BatchPredictRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BatchPredictRequest) - com.google.cloud.automl.v1beta1.BatchPredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 5: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 5: - return internalGetMutableParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictRequest.class, - com.google.cloud.automl.v1beta1.BatchPredictRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.BatchPredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - internalGetMutableParams().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BatchPredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictRequest build() { - com.google.cloud.automl.v1beta1.BatchPredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictRequest buildPartial() { - com.google.cloud.automl.v1beta1.BatchPredictRequest result = - new com.google.cloud.automl.v1beta1.BatchPredictRequest(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - result.params_ = internalGetParams(); - result.params_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.BatchPredictRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.BatchPredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BatchPredictRequest other) { - if (other == com.google.cloud.automl.v1beta1.BatchPredictRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - internalGetMutableParams().mergeFrom(other.internalGetParams()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.BatchPredictRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BatchPredictRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Name of the model requested to serve the batch prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the batch prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the batch prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the batch prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the batch prediction.
-     * 
- * - * - * 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.automl.v1beta1.BatchPredictInputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictInputConfig, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder> - inputConfigBuilder_; - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance() - : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInputConfig(com.google.cloud.automl.v1beta1.BatchPredictInputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInputConfig( - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeInputConfig(com.google.cloud.automl.v1beta1.BatchPredictInputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.newBuilder(inputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder - getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictInputConfig.getDefaultInstance() - : inputConfig_; - } - } - /** - * - * - *
-     * Required. The input configuration for batch prediction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictInputConfig, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictInputConfig, - com.google.cloud.automl.v1beta1.BatchPredictInputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder>( - getInputConfig(), getParentForChildren(), isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private com.google.cloud.automl.v1beta1.BatchPredictOutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Required. The Configuration specifying where output predictions should
-     * be written.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.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.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.getDefaultInstance() - : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The Configuration specifying where output predictions should
-     * be written.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig(com.google.cloud.automl.v1beta1.BatchPredictOutputConfig 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.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig( - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.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.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeOutputConfig( - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.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.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.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.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.Builder - getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The Configuration specifying where output predictions should
-     * be written.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOutputConfigOrBuilder - getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Required. The Configuration specifying where output predictions should
-     * be written.
-     * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig.Builder, - com.google.cloud.automl.v1beta1.BatchPredictOutputConfigOrBuilder>( - getOutputConfig(), getParentForChildren(), isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - private com.google.protobuf.MapField - internalGetMutableParams() { - onChanged(); - ; - if (params_ == null) { - params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - } - if (!params_.isMutable()) { - params_ = params_.copy(); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-     * Required. Additional domain-specific parameters for the predictions, any string must
-     * be up to 25000 characters long.
-     * *  For Text Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for a text snippet, it will only produce results
-     *         that have at least this confidence score. The default is 0.5.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for an image, it will only produce results that
-     *         have at least this confidence score. The default is 0.5.
-     * *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be produced per image. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Video Classification :
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *        makes predictions for a video, it will only produce results that
-     *        have at least this confidence score. The default is 0.5.
-     *    `segment_classification` - (boolean) Set to true to request
-     *        segment-level classification. AutoML Video Intelligence returns
-     *        labels and their confidence scores for the entire segment of the
-     *        video that user specified in the request configuration.
-     *        The default is "true".
-     *    `shot_classification` - (boolean) Set to true to request shot-level
-     *        classification. AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no metrics
-     *        provided to describe that quality. The default is "false".
-     *    `1s_interval_classification` - (boolean) Set to true to request
-     *        classification for a video at one-second intervals. AutoML Video
-     *        Intelligence returns labels and their confidence scores for each
-     *        second of the entire segment of the video that user specified in the
-     *        request configuration.
-     *        WARNING: Model evaluation is not done for this classification
-     *        type, the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality. The default is
-     *        "false".
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotations. The
-     *        default is false.
-     * *  For Video Object Tracking:
-     *    `score_threshold` - (float) When Model detects objects on video frames,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned per frame. Default is 100, the requested
-     *        value may be limited by server.
-     *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-     *      at least that long as a relative value of video frame size will be
-     *      returned. Value in 0 to 1 range. Default is 0.
-     * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-     * Required. Additional domain-specific parameters for the predictions, any string must
-     * be up to 25000 characters long.
-     * *  For Text Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for a text snippet, it will only produce results
-     *         that have at least this confidence score. The default is 0.5.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for an image, it will only produce results that
-     *         have at least this confidence score. The default is 0.5.
-     * *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be produced per image. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Video Classification :
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *        makes predictions for a video, it will only produce results that
-     *        have at least this confidence score. The default is 0.5.
-     *    `segment_classification` - (boolean) Set to true to request
-     *        segment-level classification. AutoML Video Intelligence returns
-     *        labels and their confidence scores for the entire segment of the
-     *        video that user specified in the request configuration.
-     *        The default is "true".
-     *    `shot_classification` - (boolean) Set to true to request shot-level
-     *        classification. AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no metrics
-     *        provided to describe that quality. The default is "false".
-     *    `1s_interval_classification` - (boolean) Set to true to request
-     *        classification for a video at one-second intervals. AutoML Video
-     *        Intelligence returns labels and their confidence scores for each
-     *        second of the entire segment of the video that user specified in the
-     *        request configuration.
-     *        WARNING: Model evaluation is not done for this classification
-     *        type, the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality. The default is
-     *        "false".
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotations. The
-     *        default is false.
-     * *  For Video Object Tracking:
-     *    `score_threshold` - (float) When Model detects objects on video frames,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned per frame. Default is 100, the requested
-     *        value may be limited by server.
-     *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-     *      at least that long as a relative value of video frame size will be
-     *      returned. Value in 0 to 1 range. Default is 0.
-     * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-     * Required. Additional domain-specific parameters for the predictions, any string must
-     * be up to 25000 characters long.
-     * *  For Text Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for a text snippet, it will only produce results
-     *         that have at least this confidence score. The default is 0.5.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for an image, it will only produce results that
-     *         have at least this confidence score. The default is 0.5.
-     * *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be produced per image. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Video Classification :
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *        makes predictions for a video, it will only produce results that
-     *        have at least this confidence score. The default is 0.5.
-     *    `segment_classification` - (boolean) Set to true to request
-     *        segment-level classification. AutoML Video Intelligence returns
-     *        labels and their confidence scores for the entire segment of the
-     *        video that user specified in the request configuration.
-     *        The default is "true".
-     *    `shot_classification` - (boolean) Set to true to request shot-level
-     *        classification. AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no metrics
-     *        provided to describe that quality. The default is "false".
-     *    `1s_interval_classification` - (boolean) Set to true to request
-     *        classification for a video at one-second intervals. AutoML Video
-     *        Intelligence returns labels and their confidence scores for each
-     *        second of the entire segment of the video that user specified in the
-     *        request configuration.
-     *        WARNING: Model evaluation is not done for this classification
-     *        type, the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality. The default is
-     *        "false".
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotations. The
-     *        default is false.
-     * *  For Video Object Tracking:
-     *    `score_threshold` - (float) When Model detects objects on video frames,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned per frame. Default is 100, the requested
-     *        value may be limited by server.
-     *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-     *      at least that long as a relative value of video frame size will be
-     *      returned. Value in 0 to 1 range. Default is 0.
-     * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.lang.String getParamsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Required. Additional domain-specific parameters for the predictions, any string must
-     * be up to 25000 characters long.
-     * *  For Text Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for a text snippet, it will only produce results
-     *         that have at least this confidence score. The default is 0.5.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for an image, it will only produce results that
-     *         have at least this confidence score. The default is 0.5.
-     * *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be produced per image. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Video Classification :
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *        makes predictions for a video, it will only produce results that
-     *        have at least this confidence score. The default is 0.5.
-     *    `segment_classification` - (boolean) Set to true to request
-     *        segment-level classification. AutoML Video Intelligence returns
-     *        labels and their confidence scores for the entire segment of the
-     *        video that user specified in the request configuration.
-     *        The default is "true".
-     *    `shot_classification` - (boolean) Set to true to request shot-level
-     *        classification. AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no metrics
-     *        provided to describe that quality. The default is "false".
-     *    `1s_interval_classification` - (boolean) Set to true to request
-     *        classification for a video at one-second intervals. AutoML Video
-     *        Intelligence returns labels and their confidence scores for each
-     *        second of the entire segment of the video that user specified in the
-     *        request configuration.
-     *        WARNING: Model evaluation is not done for this classification
-     *        type, the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality. The default is
-     *        "false".
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotations. The
-     *        default is false.
-     * *  For Video Object Tracking:
-     *    `score_threshold` - (float) When Model detects objects on video frames,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned per frame. Default is 100, the requested
-     *        value may be limited by server.
-     *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-     *      at least that long as a relative value of video frame size will be
-     *      returned. Value in 0 to 1 range. Default is 0.
-     * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearParams() { - internalGetMutableParams().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Required. Additional domain-specific parameters for the predictions, any string must
-     * be up to 25000 characters long.
-     * *  For Text Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for a text snippet, it will only produce results
-     *         that have at least this confidence score. The default is 0.5.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for an image, it will only produce results that
-     *         have at least this confidence score. The default is 0.5.
-     * *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be produced per image. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Video Classification :
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *        makes predictions for a video, it will only produce results that
-     *        have at least this confidence score. The default is 0.5.
-     *    `segment_classification` - (boolean) Set to true to request
-     *        segment-level classification. AutoML Video Intelligence returns
-     *        labels and their confidence scores for the entire segment of the
-     *        video that user specified in the request configuration.
-     *        The default is "true".
-     *    `shot_classification` - (boolean) Set to true to request shot-level
-     *        classification. AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no metrics
-     *        provided to describe that quality. The default is "false".
-     *    `1s_interval_classification` - (boolean) Set to true to request
-     *        classification for a video at one-second intervals. AutoML Video
-     *        Intelligence returns labels and their confidence scores for each
-     *        second of the entire segment of the video that user specified in the
-     *        request configuration.
-     *        WARNING: Model evaluation is not done for this classification
-     *        type, the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality. The default is
-     *        "false".
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotations. The
-     *        default is false.
-     * *  For Video Object Tracking:
-     *    `score_threshold` - (float) When Model detects objects on video frames,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned per frame. Default is 100, the requested
-     *        value may be limited by server.
-     *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-     *      at least that long as a relative value of video frame size will be
-     *      returned. Value in 0 to 1 range. Default is 0.
-     * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder removeParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableParams() { - return internalGetMutableParams().getMutableMap(); - } - /** - * - * - *
-     * Required. Additional domain-specific parameters for the predictions, any string must
-     * be up to 25000 characters long.
-     * *  For Text Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for a text snippet, it will only produce results
-     *         that have at least this confidence score. The default is 0.5.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for an image, it will only produce results that
-     *         have at least this confidence score. The default is 0.5.
-     * *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be produced per image. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Video Classification :
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *        makes predictions for a video, it will only produce results that
-     *        have at least this confidence score. The default is 0.5.
-     *    `segment_classification` - (boolean) Set to true to request
-     *        segment-level classification. AutoML Video Intelligence returns
-     *        labels and their confidence scores for the entire segment of the
-     *        video that user specified in the request configuration.
-     *        The default is "true".
-     *    `shot_classification` - (boolean) Set to true to request shot-level
-     *        classification. AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no metrics
-     *        provided to describe that quality. The default is "false".
-     *    `1s_interval_classification` - (boolean) Set to true to request
-     *        classification for a video at one-second intervals. AutoML Video
-     *        Intelligence returns labels and their confidence scores for each
-     *        second of the entire segment of the video that user specified in the
-     *        request configuration.
-     *        WARNING: Model evaluation is not done for this classification
-     *        type, the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality. The default is
-     *        "false".
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotations. The
-     *        default is false.
-     * *  For Video Object Tracking:
-     *    `score_threshold` - (float) When Model detects objects on video frames,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned per frame. Default is 100, the requested
-     *        value may be limited by server.
-     *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-     *      at least that long as a relative value of video frame size will be
-     *      returned. Value in 0 to 1 range. Default is 0.
-     * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder putParams(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Required. Additional domain-specific parameters for the predictions, any string must
-     * be up to 25000 characters long.
-     * *  For Text Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for a text snippet, it will only produce results
-     *         that have at least this confidence score. The default is 0.5.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *         makes predictions for an image, it will only produce results that
-     *         have at least this confidence score. The default is 0.5.
-     * *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be produced per image. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Video Classification :
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *        makes predictions for a video, it will only produce results that
-     *        have at least this confidence score. The default is 0.5.
-     *    `segment_classification` - (boolean) Set to true to request
-     *        segment-level classification. AutoML Video Intelligence returns
-     *        labels and their confidence scores for the entire segment of the
-     *        video that user specified in the request configuration.
-     *        The default is "true".
-     *    `shot_classification` - (boolean) Set to true to request shot-level
-     *        classification. AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no metrics
-     *        provided to describe that quality. The default is "false".
-     *    `1s_interval_classification` - (boolean) Set to true to request
-     *        classification for a video at one-second intervals. AutoML Video
-     *        Intelligence returns labels and their confidence scores for each
-     *        second of the entire segment of the video that user specified in the
-     *        request configuration.
-     *        WARNING: Model evaluation is not done for this classification
-     *        type, the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality. The default is
-     *        "false".
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotations. The
-     *        default is false.
-     * *  For Video Object Tracking:
-     *    `score_threshold` - (float) When Model detects objects on video frames,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned per frame. Default is 100, the requested
-     *        value may be limited by server.
-     *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-     *      at least that long as a relative value of video frame size will be
-     *      returned. Value in 0 to 1 range. Default is 0.
-     * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder putAllParams(java.util.Map values) { - internalGetMutableParams().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.BatchPredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BatchPredictRequest) - private static final com.google.cloud.automl.v1beta1.BatchPredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BatchPredictRequest(); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchPredictRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchPredictRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequestOrBuilder.java deleted file mode 100644 index 360898b56..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictRequestOrBuilder.java +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -public interface BatchPredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BatchPredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of the model requested to serve the batch prediction.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Name of the model requested to serve the batch prediction.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The input configuration for batch prediction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - * - * - *
-   * Required. The input configuration for batch prediction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The inputConfig. - */ - com.google.cloud.automl.v1beta1.BatchPredictInputConfig getInputConfig(); - /** - * - * - *
-   * Required. The input configuration for batch prediction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictInputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.BatchPredictInputConfigOrBuilder getInputConfigOrBuilder(); - - /** - * - * - *
-   * Required. The Configuration specifying where output predictions should
-   * be written.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Required. The Configuration specifying where output predictions should
-   * be written.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - com.google.cloud.automl.v1beta1.BatchPredictOutputConfig getOutputConfig(); - /** - * - * - *
-   * Required. The Configuration specifying where output predictions should
-   * be written.
-   * 
- * - * - * .google.cloud.automl.v1beta1.BatchPredictOutputConfig output_config = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.BatchPredictOutputConfigOrBuilder getOutputConfigOrBuilder(); - - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - int getParamsCount(); - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - boolean containsParams(java.lang.String key); - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getParams(); - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - java.util.Map getParamsMap(); - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Required. Additional domain-specific parameters for the predictions, any string must
-   * be up to 25000 characters long.
-   * *  For Text Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for a text snippet, it will only produce results
-   *         that have at least this confidence score. The default is 0.5.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *         makes predictions for an image, it will only produce results that
-   *         have at least this confidence score. The default is 0.5.
-   * *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be produced per image. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Video Classification :
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *        makes predictions for a video, it will only produce results that
-   *        have at least this confidence score. The default is 0.5.
-   *    `segment_classification` - (boolean) Set to true to request
-   *        segment-level classification. AutoML Video Intelligence returns
-   *        labels and their confidence scores for the entire segment of the
-   *        video that user specified in the request configuration.
-   *        The default is "true".
-   *    `shot_classification` - (boolean) Set to true to request shot-level
-   *        classification. AutoML Video Intelligence determines the boundaries
-   *        for each camera shot in the entire segment of the video that user
-   *        specified in the request configuration. AutoML Video Intelligence
-   *        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 training data, but there are no metrics
-   *        provided to describe that quality. The default is "false".
-   *    `1s_interval_classification` - (boolean) Set to true to request
-   *        classification for a video at one-second intervals. AutoML Video
-   *        Intelligence returns labels and their confidence scores for each
-   *        second of the entire segment of the video that user specified in the
-   *        request configuration.
-   *        WARNING: Model evaluation is not done for this classification
-   *        type, the quality of it depends on training data, but there are no
-   *        metrics provided to describe that quality. The default is
-   *        "false".
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotations. The
-   *        default is false.
-   * *  For Video Object Tracking:
-   *    `score_threshold` - (float) When Model detects objects on video frames,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned per frame. Default is 100, the requested
-   *        value may be limited by server.
-   *    `min_bounding_box_size` - (float) Only bounding boxes with shortest edge
-   *      at least that long as a relative value of video frame size will be
-   *      returned. Value in 0 to 1 range. Default is 0.
-   * 
- * - * map<string, string> params = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - java.lang.String getParamsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResult.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResult.java deleted file mode 100644 index 421cd06e1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResult.java +++ /dev/null @@ -1,844 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Result of the Batch Predict. This message is returned in
- * [response][google.longrunning.Operation.response] of the operation returned
- * by the [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictResult} - */ -public final class BatchPredictResult extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BatchPredictResult) - BatchPredictResultOrBuilder { - private static final long serialVersionUID = 0L; - // Use BatchPredictResult.newBuilder() to construct. - private BatchPredictResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BatchPredictResult() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BatchPredictResult(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BatchPredictResult( - 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)) { - metadata_ = - com.google.protobuf.MapField.newMapField( - MetadataDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictResult_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictResult.class, - com.google.cloud.automl.v1beta1.BatchPredictResult.Builder.class); - } - - public static final int METADATA_FIELD_NUMBER = 1; - - private static final class MetadataDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictResult_MetadataEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { - if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); - } - return metadata_; - } - - public int getMetadataCount() { - return internalGetMetadata().getMap().size(); - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - public boolean containsMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetMetadata().getMap().containsKey(key); - } - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - public java.util.Map getMetadataMap() { - return internalGetMetadata().getMap(); - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - public java.lang.String getMetadataOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - public java.lang.String getMetadataOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetMetadata().getMap().entrySet()) { - com.google.protobuf.MapEntry metadata__ = - MetadataDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, metadata__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.BatchPredictResult)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BatchPredictResult other = - (com.google.cloud.automl.v1beta1.BatchPredictResult) obj; - - if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (!internalGetMetadata().getMap().isEmpty()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + internalGetMetadata().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.BatchPredictResult prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Result of the Batch Predict. This message is returned in
-   * [response][google.longrunning.Operation.response] of the operation returned
-   * by the [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BatchPredictResult} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BatchPredictResult) - com.google.cloud.automl.v1beta1.BatchPredictResultOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictResult_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictResult_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BatchPredictResult.class, - com.google.cloud.automl.v1beta1.BatchPredictResult.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.BatchPredictResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableMetadata().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_BatchPredictResult_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictResult getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BatchPredictResult.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictResult build() { - com.google.cloud.automl.v1beta1.BatchPredictResult result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictResult buildPartial() { - com.google.cloud.automl.v1beta1.BatchPredictResult result = - new com.google.cloud.automl.v1beta1.BatchPredictResult(this); - int from_bitField0_ = bitField0_; - result.metadata_ = internalGetMetadata(); - result.metadata_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.BatchPredictResult) { - return mergeFrom((com.google.cloud.automl.v1beta1.BatchPredictResult) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BatchPredictResult other) { - if (other == com.google.cloud.automl.v1beta1.BatchPredictResult.getDefaultInstance()) - return this; - internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.BatchPredictResult parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BatchPredictResult) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { - if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); - } - return metadata_; - } - - private com.google.protobuf.MapField - internalGetMutableMetadata() { - onChanged(); - ; - if (metadata_ == null) { - metadata_ = - com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); - } - if (!metadata_.isMutable()) { - metadata_ = metadata_.copy(); - } - return metadata_; - } - - public int getMetadataCount() { - return internalGetMetadata().getMap().size(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * *  For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * *  For Video Object Tracking:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      frame could have been returned.
-     * 
- * - * map<string, string> metadata = 1; - */ - public boolean containsMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetMetadata().getMap().containsKey(key); - } - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * *  For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * *  For Video Object Tracking:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      frame could have been returned.
-     * 
- * - * map<string, string> metadata = 1; - */ - public java.util.Map getMetadataMap() { - return internalGetMetadata().getMap(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * *  For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * *  For Video Object Tracking:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      frame could have been returned.
-     * 
- * - * map<string, string> metadata = 1; - */ - public java.lang.String getMetadataOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * *  For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * *  For Video Object Tracking:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      frame could have been returned.
-     * 
- * - * map<string, string> metadata = 1; - */ - public java.lang.String getMetadataOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearMetadata() { - internalGetMutableMetadata().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * *  For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * *  For Video Object Tracking:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      frame could have been returned.
-     * 
- * - * map<string, string> metadata = 1; - */ - public Builder removeMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableMetadata().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableMetadata() { - return internalGetMutableMetadata().getMutableMap(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * *  For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * *  For Video Object Tracking:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      frame could have been returned.
-     * 
- * - * map<string, string> metadata = 1; - */ - public Builder putMetadata(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableMetadata().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * *  For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * *  For Video Object Tracking:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      frame could have been returned.
-     * 
- * - * map<string, string> metadata = 1; - */ - public Builder putAllMetadata(java.util.Map values) { - internalGetMutableMetadata().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.BatchPredictResult) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BatchPredictResult) - private static final com.google.cloud.automl.v1beta1.BatchPredictResult DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BatchPredictResult(); - } - - public static com.google.cloud.automl.v1beta1.BatchPredictResult getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BatchPredictResult parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchPredictResult(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BatchPredictResult getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResultOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResultOrBuilder.java deleted file mode 100644 index 1ff326dbf..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BatchPredictResultOrBuilder.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -public interface BatchPredictResultOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BatchPredictResult) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - int getMetadataCount(); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - boolean containsMetadata(java.lang.String key); - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Deprecated - java.util.Map getMetadata(); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - java.util.Map getMetadataMap(); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * *  For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * *  For Video Object Tracking:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      frame could have been returned.
-   * 
- * - * map<string, string> metadata = 1; - */ - java.lang.String getMetadataOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestination.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestination.java deleted file mode 100644 index aafe1e282..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestination.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The BigQuery location for the output content.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BigQueryDestination} - */ -public final class BigQueryDestination extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BigQueryDestination.class, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder.class); - } - - public static final int OUTPUT_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object outputUri_; - /** - * - * - *
-   * Required. BigQuery URI to a project, up to 2000 characters long.
-   * Accepted forms:
-   * *  BigQuery path e.g. bq://projectId
-   * 
- * - * string output_uri = 1; - * - * @return The outputUri. - */ - 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, up to 2000 characters long.
-   * Accepted forms:
-   * *  BigQuery path e.g. bq://projectId
-   * 
- * - * string output_uri = 1; - * - * @return The bytes for outputUri. - */ - 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.automl.v1beta1.BigQueryDestination)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BigQueryDestination other = - (com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BigQueryDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BigQueryDestination parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.BigQueryDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BigQueryDestination) - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQueryDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BigQueryDestination.class, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQueryDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BigQueryDestination getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BigQueryDestination build() { - com.google.cloud.automl.v1beta1.BigQueryDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BigQueryDestination buildPartial() { - com.google.cloud.automl.v1beta1.BigQueryDestination result = - new com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination) { - return mergeFrom((com.google.cloud.automl.v1beta1.BigQueryDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BigQueryDestination other) { - if (other == com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.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, up to 2000 characters long.
-     * Accepted forms:
-     * *  BigQuery path e.g. bq://projectId
-     * 
- * - * string output_uri = 1; - * - * @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, up to 2000 characters long.
-     * Accepted forms:
-     * *  BigQuery path e.g. bq://projectId
-     * 
- * - * string output_uri = 1; - * - * @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, up to 2000 characters long.
-     * Accepted forms:
-     * *  BigQuery path e.g. bq://projectId
-     * 
- * - * string output_uri = 1; - * - * @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, up to 2000 characters long.
-     * Accepted forms:
-     * *  BigQuery path e.g. bq://projectId
-     * 
- * - * string output_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearOutputUri() { - - outputUri_ = getDefaultInstance().getOutputUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. BigQuery URI to a project, up to 2000 characters long.
-     * Accepted forms:
-     * *  BigQuery path e.g. bq://projectId
-     * 
- * - * string output_uri = 1; - * - * @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.automl.v1beta1.BigQueryDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BigQueryDestination) - private static final com.google.cloud.automl.v1beta1.BigQueryDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BigQueryDestination(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQueryDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestinationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestinationOrBuilder.java deleted file mode 100644 index 9f8aadcbe..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQueryDestinationOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface BigQueryDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BigQueryDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. BigQuery URI to a project, up to 2000 characters long.
-   * Accepted forms:
-   * *  BigQuery path e.g. bq://projectId
-   * 
- * - * string output_uri = 1; - * - * @return The outputUri. - */ - java.lang.String getOutputUri(); - /** - * - * - *
-   * Required. BigQuery URI to a project, up to 2000 characters long.
-   * Accepted forms:
-   * *  BigQuery path e.g. bq://projectId
-   * 
- * - * string output_uri = 1; - * - * @return The bytes for outputUri. - */ - com.google.protobuf.ByteString getOutputUriBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySource.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySource.java deleted file mode 100644 index d36ce622a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySource.java +++ /dev/null @@ -1,646 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The BigQuery location for the input content.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BigQuerySource} - */ -public final class BigQuerySource extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQuerySource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQuerySource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BigQuerySource.class, - com.google.cloud.automl.v1beta1.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 e.g. bq://projectId.bqDatasetId.bqTableId
-   * 
- * - * string input_uri = 1; - * - * @return The inputUri. - */ - 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 e.g. bq://projectId.bqDatasetId.bqTableId
-   * 
- * - * string input_uri = 1; - * - * @return The bytes for inputUri. - */ - 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.automl.v1beta1.BigQuerySource)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BigQuerySource other = - (com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BigQuerySource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BigQuerySource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.BigQuerySource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BigQuerySource) - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQuerySource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQuerySource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BigQuerySource.class, - com.google.cloud.automl.v1beta1.BigQuerySource.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_BigQuerySource_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BigQuerySource getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BigQuerySource build() { - com.google.cloud.automl.v1beta1.BigQuerySource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BigQuerySource buildPartial() { - com.google.cloud.automl.v1beta1.BigQuerySource result = - new com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource) { - return mergeFrom((com.google.cloud.automl.v1beta1.BigQuerySource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BigQuerySource other) { - if (other == com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.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 e.g. bq://projectId.bqDatasetId.bqTableId
-     * 
- * - * string input_uri = 1; - * - * @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 e.g. bq://projectId.bqDatasetId.bqTableId
-     * 
- * - * string input_uri = 1; - * - * @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 e.g. bq://projectId.bqDatasetId.bqTableId
-     * 
- * - * string input_uri = 1; - * - * @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 e.g. bq://projectId.bqDatasetId.bqTableId
-     * 
- * - * string input_uri = 1; - * - * @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 e.g. bq://projectId.bqDatasetId.bqTableId
-     * 
- * - * string input_uri = 1; - * - * @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.automl.v1beta1.BigQuerySource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BigQuerySource) - private static final com.google.cloud.automl.v1beta1.BigQuerySource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BigQuerySource(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.BigQuerySource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySourceOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySourceOrBuilder.java deleted file mode 100644 index e8c336291..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BigQuerySourceOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface BigQuerySourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BigQuerySource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. BigQuery URI to a table, up to 2000 characters long.
-   * Accepted forms:
-   * *  BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId
-   * 
- * - * string input_uri = 1; - * - * @return The inputUri. - */ - java.lang.String getInputUri(); - /** - * - * - *
-   * Required. BigQuery URI to a table, up to 2000 characters long.
-   * Accepted forms:
-   * *  BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId
-   * 
- * - * string input_uri = 1; - * - * @return The bytes for inputUri. - */ - com.google.protobuf.ByteString getInputUriBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntry.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntry.java deleted file mode 100644 index 9355f9796..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntry.java +++ /dev/null @@ -1,2168 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Bounding box matching model metrics for a single intersection-over-union
- * threshold and multiple label match confidence thresholds.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} - */ -public final class BoundingBoxMetricsEntry extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) - BoundingBoxMetricsEntryOrBuilder { - private static final long serialVersionUID = 0L; - // Use BoundingBoxMetricsEntry.newBuilder() to construct. - private BoundingBoxMetricsEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BoundingBoxMetricsEntry() { - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BoundingBoxMetricsEntry(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BoundingBoxMetricsEntry( - 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 13: - { - iouThreshold_ = input.readFloat(); - break; - } - case 21: - { - meanAveragePrecision_ = input.readFloat(); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntries_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - .ConfidenceMetricsEntry>(); - mutable_bitField0_ |= 0x00000001; - } - confidenceMetricsEntries_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .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)) { - confidenceMetricsEntries_ = - java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.class, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder.class); - } - - public interface ConfidenceMetricsEntryOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. The confidence threshold value used to compute the metrics.
-     * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - float getConfidenceThreshold(); - - /** - * - * - *
-     * Output only. Recall under the given confidence threshold.
-     * 
- * - * float recall = 2; - * - * @return The recall. - */ - float getRecall(); - - /** - * - * - *
-     * Output only. Precision under the given confidence threshold.
-     * 
- * - * float precision = 3; - * - * @return The precision. - */ - float getPrecision(); - - /** - * - * - *
-     * Output only. The harmonic mean of recall and precision.
-     * 
- * - * float f1_score = 4; - * - * @return The f1Score. - */ - float getF1Score(); - } - /** - * - * - *
-   * Metrics for a single confidence threshold.
-   * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} - */ - public static final class ConfidenceMetricsEntry extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - ConfidenceMetricsEntryOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfidenceMetricsEntry.newBuilder() to construct. - private ConfidenceMetricsEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ConfidenceMetricsEntry() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ConfidenceMetricsEntry(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfidenceMetricsEntry( - 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 21: - { - recall_ = input.readFloat(); - break; - } - case 29: - { - precision_ = input.readFloat(); - break; - } - case 37: - { - f1Score_ = 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.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.class, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder - .class); - } - - public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; - private float confidenceThreshold_; - /** - * - * - *
-     * Output only. The confidence threshold value used to compute the metrics.
-     * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - public float getConfidenceThreshold() { - return confidenceThreshold_; - } - - public static final int RECALL_FIELD_NUMBER = 2; - private float recall_; - /** - * - * - *
-     * Output only. Recall under the given confidence threshold.
-     * 
- * - * float recall = 2; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - - public static final int PRECISION_FIELD_NUMBER = 3; - private float precision_; - /** - * - * - *
-     * Output only. Precision under the given confidence threshold.
-     * 
- * - * float precision = 3; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - - public static final int F1_SCORE_FIELD_NUMBER = 4; - private float f1Score_; - /** - * - * - *
-     * Output only. The harmonic mean of recall and precision.
-     * 
- * - * float f1_score = 4; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (recall_ != 0F) { - output.writeFloat(2, recall_); - } - if (precision_ != 0F) { - output.writeFloat(3, precision_); - } - if (f1Score_ != 0F) { - output.writeFloat(4, f1Score_); - } - 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 (recall_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, recall_); - } - if (precision_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, precision_); - } - if (f1Score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, f1Score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry other = - (com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) obj; - - if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) - != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; - if (java.lang.Float.floatToIntBits(getRecall()) - != java.lang.Float.floatToIntBits(other.getRecall())) return false; - if (java.lang.Float.floatToIntBits(getPrecision()) - != java.lang.Float.floatToIntBits(other.getPrecision())) return false; - if (java.lang.Float.floatToIntBits(getF1Score()) - != java.lang.Float.floatToIntBits(other.getF1Score())) return false; - if (!unknownFields.equals(other.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) + RECALL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecall()); - hash = (37 * hash) + PRECISION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getPrecision()); - hash = (37 * hash) + F1_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getF1Score()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Metrics for a single confidence threshold.
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .class, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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; - - recall_ = 0F; - - precision_ = 0F; - - f1Score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - build() { - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - buildPartial() { - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry result = - new com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry( - this); - result.confidenceThreshold_ = confidenceThreshold_; - result.recall_ = recall_; - result.precision_ = precision_; - result.f1Score_ = f1Score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry other) { - if (other - == com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .getDefaultInstance()) return this; - if (other.getConfidenceThreshold() != 0F) { - setConfidenceThreshold(other.getConfidenceThreshold()); - } - if (other.getRecall() != 0F) { - setRecall(other.getRecall()); - } - if (other.getPrecision() != 0F) { - setPrecision(other.getPrecision()); - } - if (other.getF1Score() != 0F) { - setF1Score(other.getF1Score()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float confidenceThreshold_; - /** - * - * - *
-       * Output only. The confidence threshold value used to compute the metrics.
-       * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - public float getConfidenceThreshold() { - return confidenceThreshold_; - } - /** - * - * - *
-       * Output only. The confidence threshold value used to compute the metrics.
-       * 
- * - * 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; - } - /** - * - * - *
-       * Output only. The confidence threshold value used to compute the metrics.
-       * 
- * - * float confidence_threshold = 1; - * - * @return This builder for chaining. - */ - public Builder clearConfidenceThreshold() { - - confidenceThreshold_ = 0F; - onChanged(); - return this; - } - - private float recall_; - /** - * - * - *
-       * Output only. Recall under the given confidence threshold.
-       * 
- * - * float recall = 2; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - /** - * - * - *
-       * Output only. Recall under the given confidence threshold.
-       * 
- * - * float recall = 2; - * - * @param value The recall to set. - * @return This builder for chaining. - */ - public Builder setRecall(float value) { - - recall_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Recall under the given confidence threshold.
-       * 
- * - * float recall = 2; - * - * @return This builder for chaining. - */ - public Builder clearRecall() { - - recall_ = 0F; - onChanged(); - return this; - } - - private float precision_; - /** - * - * - *
-       * Output only. Precision under the given confidence threshold.
-       * 
- * - * float precision = 3; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - /** - * - * - *
-       * Output only. Precision under the given confidence threshold.
-       * 
- * - * float precision = 3; - * - * @param value The precision to set. - * @return This builder for chaining. - */ - public Builder setPrecision(float value) { - - precision_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Precision under the given confidence threshold.
-       * 
- * - * float precision = 3; - * - * @return This builder for chaining. - */ - public Builder clearPrecision() { - - precision_ = 0F; - onChanged(); - return this; - } - - private float f1Score_; - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 4; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 4; - * - * @param value The f1Score to set. - * @return This builder for chaining. - */ - public Builder setF1Score(float value) { - - f1Score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 4; - * - * @return This builder for chaining. - */ - public Builder clearF1Score() { - - f1Score_ = 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.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry) - private static final com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - .ConfidenceMetricsEntry - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry(); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConfidenceMetricsEntry parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfidenceMetricsEntry(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int IOU_THRESHOLD_FIELD_NUMBER = 1; - private float iouThreshold_; - /** - * - * - *
-   * Output only. The intersection-over-union threshold value used to compute
-   * this metrics entry.
-   * 
- * - * float iou_threshold = 1; - * - * @return The iouThreshold. - */ - public float getIouThreshold() { - return iouThreshold_; - } - - public static final int MEAN_AVERAGE_PRECISION_FIELD_NUMBER = 2; - private float meanAveragePrecision_; - /** - * - * - *
-   * Output only. The mean average precision, most often close to au_prc.
-   * 
- * - * float mean_average_precision = 2; - * - * @return The meanAveragePrecision. - */ - public float getMeanAveragePrecision() { - return meanAveragePrecision_; - } - - public static final int CONFIDENCE_METRICS_ENTRIES_FIELD_NUMBER = 3; - private java.util.List< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry> - confidenceMetricsEntries_; - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry> - getConfidenceMetricsEntriesList() { - return confidenceMetricsEntries_; - } - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesOrBuilderList() { - return confidenceMetricsEntries_; - } - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public int getConfidenceMetricsEntriesCount() { - return confidenceMetricsEntries_.size(); - } - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - getConfidenceMetricsEntries(int index) { - return confidenceMetricsEntries_.get(index); - } - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntriesOrBuilder(int index) { - return confidenceMetricsEntries_.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 (iouThreshold_ != 0F) { - output.writeFloat(1, iouThreshold_); - } - if (meanAveragePrecision_ != 0F) { - output.writeFloat(2, meanAveragePrecision_); - } - for (int i = 0; i < confidenceMetricsEntries_.size(); i++) { - output.writeMessage(3, confidenceMetricsEntries_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (iouThreshold_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, iouThreshold_); - } - if (meanAveragePrecision_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, meanAveragePrecision_); - } - for (int i = 0; i < confidenceMetricsEntries_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, confidenceMetricsEntries_.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.automl.v1beta1.BoundingBoxMetricsEntry)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry other = - (com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) obj; - - if (java.lang.Float.floatToIntBits(getIouThreshold()) - != java.lang.Float.floatToIntBits(other.getIouThreshold())) return false; - if (java.lang.Float.floatToIntBits(getMeanAveragePrecision()) - != java.lang.Float.floatToIntBits(other.getMeanAveragePrecision())) return false; - if (!getConfidenceMetricsEntriesList().equals(other.getConfidenceMetricsEntriesList())) - return false; - if (!unknownFields.equals(other.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) + IOU_THRESHOLD_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getIouThreshold()); - hash = (37 * hash) + MEAN_AVERAGE_PRECISION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMeanAveragePrecision()); - if (getConfidenceMetricsEntriesCount() > 0) { - hash = (37 * hash) + CONFIDENCE_METRICS_ENTRIES_FIELD_NUMBER; - hash = (53 * hash) + getConfidenceMetricsEntriesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Bounding box matching model metrics for a single intersection-over-union
-   * threshold and multiple label match confidence thresholds.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BoundingBoxMetricsEntry} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.class, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConfidenceMetricsEntriesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - iouThreshold_ = 0F; - - meanAveragePrecision_ = 0F; - - if (confidenceMetricsEntriesBuilder_ == null) { - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - confidenceMetricsEntriesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry build() { - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry buildPartial() { - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry result = - new com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry(this); - int from_bitField0_ = bitField0_; - result.iouThreshold_ = iouThreshold_; - result.meanAveragePrecision_ = meanAveragePrecision_; - if (confidenceMetricsEntriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntries_ = - java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.confidenceMetricsEntries_ = confidenceMetricsEntries_; - } else { - result.confidenceMetricsEntries_ = confidenceMetricsEntriesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) { - return mergeFrom((com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry other) { - if (other == com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.getDefaultInstance()) - return this; - if (other.getIouThreshold() != 0F) { - setIouThreshold(other.getIouThreshold()); - } - if (other.getMeanAveragePrecision() != 0F) { - setMeanAveragePrecision(other.getMeanAveragePrecision()); - } - if (confidenceMetricsEntriesBuilder_ == null) { - if (!other.confidenceMetricsEntries_.isEmpty()) { - if (confidenceMetricsEntries_.isEmpty()) { - confidenceMetricsEntries_ = other.confidenceMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.addAll(other.confidenceMetricsEntries_); - } - onChanged(); - } - } else { - if (!other.confidenceMetricsEntries_.isEmpty()) { - if (confidenceMetricsEntriesBuilder_.isEmpty()) { - confidenceMetricsEntriesBuilder_.dispose(); - confidenceMetricsEntriesBuilder_ = null; - confidenceMetricsEntries_ = other.confidenceMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - confidenceMetricsEntriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getConfidenceMetricsEntriesFieldBuilder() - : null; - } else { - confidenceMetricsEntriesBuilder_.addAllMessages(other.confidenceMetricsEntries_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private float iouThreshold_; - /** - * - * - *
-     * Output only. The intersection-over-union threshold value used to compute
-     * this metrics entry.
-     * 
- * - * float iou_threshold = 1; - * - * @return The iouThreshold. - */ - public float getIouThreshold() { - return iouThreshold_; - } - /** - * - * - *
-     * Output only. The intersection-over-union threshold value used to compute
-     * this metrics entry.
-     * 
- * - * float iou_threshold = 1; - * - * @param value The iouThreshold to set. - * @return This builder for chaining. - */ - public Builder setIouThreshold(float value) { - - iouThreshold_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The intersection-over-union threshold value used to compute
-     * this metrics entry.
-     * 
- * - * float iou_threshold = 1; - * - * @return This builder for chaining. - */ - public Builder clearIouThreshold() { - - iouThreshold_ = 0F; - onChanged(); - return this; - } - - private float meanAveragePrecision_; - /** - * - * - *
-     * Output only. The mean average precision, most often close to au_prc.
-     * 
- * - * float mean_average_precision = 2; - * - * @return The meanAveragePrecision. - */ - public float getMeanAveragePrecision() { - return meanAveragePrecision_; - } - /** - * - * - *
-     * Output only. The mean average precision, most often close to au_prc.
-     * 
- * - * float mean_average_precision = 2; - * - * @param value The meanAveragePrecision to set. - * @return This builder for chaining. - */ - public Builder setMeanAveragePrecision(float value) { - - meanAveragePrecision_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The mean average precision, most often close to au_prc.
-     * 
- * - * float mean_average_precision = 2; - * - * @return This builder for chaining. - */ - public Builder clearMeanAveragePrecision() { - - meanAveragePrecision_ = 0F; - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry> - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - - private void ensureConfidenceMetricsEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntries_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry>( - confidenceMetricsEntries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder> - confidenceMetricsEntriesBuilder_; - - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry> - getConfidenceMetricsEntriesList() { - if (confidenceMetricsEntriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - } else { - return confidenceMetricsEntriesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public int getConfidenceMetricsEntriesCount() { - if (confidenceMetricsEntriesBuilder_ == null) { - return confidenceMetricsEntries_.size(); - } else { - return confidenceMetricsEntriesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - getConfidenceMetricsEntries(int index) { - if (confidenceMetricsEntriesBuilder_ == null) { - return confidenceMetricsEntries_.get(index); - } else { - return confidenceMetricsEntriesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder setConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry value) { - if (confidenceMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.set(index, value); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder setConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder - builderForValue) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.set(index, builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder addConfidenceMetricsEntries( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry value) { - if (confidenceMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(value); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder addConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry value) { - if (confidenceMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(index, value); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder addConfidenceMetricsEntries( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder - builderForValue) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder addConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder - builderForValue) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(index, builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder addAllConfidenceMetricsEntries( - java.lang.Iterable< - ? extends - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry> - values) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidenceMetricsEntries_); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder clearConfidenceMetricsEntries() { - if (confidenceMetricsEntriesBuilder_ == null) { - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public Builder removeConfidenceMetricsEntries(int index) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.remove(index); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder - getConfidenceMetricsEntriesBuilder(int index) { - return getConfidenceMetricsEntriesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntriesOrBuilder(int index) { - if (confidenceMetricsEntriesBuilder_ == null) { - return confidenceMetricsEntries_.get(index); - } else { - return confidenceMetricsEntriesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesOrBuilderList() { - if (confidenceMetricsEntriesBuilder_ != null) { - return confidenceMetricsEntriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - } - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder - addConfidenceMetricsEntriesBuilder() { - return getConfidenceMetricsEntriesFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder - addConfidenceMetricsEntriesBuilder(int index) { - return getConfidenceMetricsEntriesFieldBuilder() - .addBuilder( - index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Metrics for each label-match confidence_threshold from
-     * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-     * derived from them.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder> - getConfidenceMetricsEntriesBuilderList() { - return getConfidenceMetricsEntriesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesFieldBuilder() { - if (confidenceMetricsEntriesBuilder_ == null) { - confidenceMetricsEntriesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - .Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - .ConfidenceMetricsEntryOrBuilder>( - confidenceMetricsEntries_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - confidenceMetricsEntries_ = null; - } - return confidenceMetricsEntriesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) - private static final com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry(); - } - - public static com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingBoxMetricsEntry parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingBoxMetricsEntry(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntryOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntryOrBuilder.java deleted file mode 100644 index b075bb92e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingBoxMetricsEntryOrBuilder.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -public interface BoundingBoxMetricsEntryOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BoundingBoxMetricsEntry) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The intersection-over-union threshold value used to compute
-   * this metrics entry.
-   * 
- * - * float iou_threshold = 1; - * - * @return The iouThreshold. - */ - float getIouThreshold(); - - /** - * - * - *
-   * Output only. The mean average precision, most often close to au_prc.
-   * 
- * - * float mean_average_precision = 2; - * - * @return The meanAveragePrecision. - */ - float getMeanAveragePrecision(); - - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - java.util.List - getConfidenceMetricsEntriesList(); - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry - getConfidenceMetricsEntries(int index); - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - int getConfidenceMetricsEntriesCount(); - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - java.util.List< - ? extends - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesOrBuilderList(); - /** - * - * - *
-   * Output only. Metrics for each label-match confidence_threshold from
-   * 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is
-   * derived from them.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntry confidence_metrics_entries = 3; - * - */ - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntriesOrBuilder(int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPoly.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPoly.java deleted file mode 100644 index 0aaf8f1dc..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPoly.java +++ /dev/null @@ -1,963 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/geometry.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A bounding polygon of a detected object on a plane.
- * On output both vertices and normalized_vertices are provided.
- * The polygon is formed by connecting vertices in the order they are listed.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BoundingPoly} - */ -public final class BoundingPoly extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.BoundingPoly) - BoundingPolyOrBuilder { - private static final long serialVersionUID = 0L; - // Use BoundingPoly.newBuilder() to construct. - private BoundingPoly(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private BoundingPoly() { - normalizedVertices_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new BoundingPoly(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private BoundingPoly( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - normalizedVertices_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - normalizedVertices_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.NormalizedVertex.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)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BoundingPoly.class, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder.class); - } - - public static final int NORMALIZED_VERTICES_FIELD_NUMBER = 2; - private java.util.List normalizedVertices_; - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesList() { - return normalizedVertices_; - } - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesOrBuilderList() { - return normalizedVertices_; - } - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public int getNormalizedVerticesCount() { - return normalizedVertices_.size(); - } - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.automl.v1beta1.NormalizedVertex getNormalizedVertices(int index) { - return normalizedVertices_.get(index); - } - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.automl.v1beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - return normalizedVertices_.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 < normalizedVertices_.size(); i++) { - output.writeMessage(2, normalizedVertices_.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 < normalizedVertices_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(2, normalizedVertices_.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.automl.v1beta1.BoundingPoly)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.BoundingPoly other = - (com.google.cloud.automl.v1beta1.BoundingPoly) obj; - - if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; - if (!unknownFields.equals(other.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 (getNormalizedVerticesCount() > 0) { - hash = (37 * hash) + NORMALIZED_VERTICES_FIELD_NUMBER; - hash = (53 * hash) + getNormalizedVerticesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.BoundingPoly prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 bounding polygon of a detected object on a plane.
-   * On output both vertices and normalized_vertices are provided.
-   * The polygon is formed by connecting vertices in the order they are listed.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.BoundingPoly} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.BoundingPoly) - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_BoundingPoly_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.BoundingPoly.class, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.BoundingPoly.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getNormalizedVerticesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_BoundingPoly_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingPoly getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingPoly build() { - com.google.cloud.automl.v1beta1.BoundingPoly result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingPoly buildPartial() { - com.google.cloud.automl.v1beta1.BoundingPoly result = - new com.google.cloud.automl.v1beta1.BoundingPoly(this); - int from_bitField0_ = bitField0_; - if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.normalizedVertices_ = normalizedVertices_; - } else { - result.normalizedVertices_ = normalizedVerticesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.BoundingPoly) { - return mergeFrom((com.google.cloud.automl.v1beta1.BoundingPoly) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.BoundingPoly other) { - if (other == com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance()) return this; - if (normalizedVerticesBuilder_ == null) { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVertices_.isEmpty()) { - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.addAll(other.normalizedVertices_); - } - onChanged(); - } - } else { - if (!other.normalizedVertices_.isEmpty()) { - if (normalizedVerticesBuilder_.isEmpty()) { - normalizedVerticesBuilder_.dispose(); - normalizedVerticesBuilder_ = null; - normalizedVertices_ = other.normalizedVertices_; - bitField0_ = (bitField0_ & ~0x00000001); - normalizedVerticesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNormalizedVerticesFieldBuilder() - : null; - } else { - normalizedVerticesBuilder_.addAllMessages(other.normalizedVertices_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.BoundingPoly parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.BoundingPoly) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List normalizedVertices_ = - java.util.Collections.emptyList(); - - private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - normalizedVertices_ = - new java.util.ArrayList( - normalizedVertices_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.NormalizedVertex, - com.google.cloud.automl.v1beta1.NormalizedVertex.Builder, - com.google.cloud.automl.v1beta1.NormalizedVertexOrBuilder> - normalizedVerticesBuilder_; - - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesList() { - if (normalizedVerticesBuilder_ == null) { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } else { - return normalizedVerticesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public int getNormalizedVerticesCount() { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.size(); - } else { - return normalizedVerticesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.automl.v1beta1.NormalizedVertex getNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); - } else { - return normalizedVerticesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.automl.v1beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder setNormalizedVertices( - int index, com.google.cloud.automl.v1beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.set(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices(com.google.cloud.automl.v1beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.automl.v1beta1.NormalizedVertex value) { - if (normalizedVerticesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, value); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - com.google.cloud.automl.v1beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addNormalizedVertices( - int index, com.google.cloud.automl.v1beta1.NormalizedVertex.Builder builderForValue) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.add(index, builderForValue.build()); - onChanged(); - } else { - normalizedVerticesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder addAllNormalizedVertices( - java.lang.Iterable values) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, normalizedVertices_); - onChanged(); - } else { - normalizedVerticesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder clearNormalizedVertices() { - if (normalizedVerticesBuilder_ == null) { - normalizedVertices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - normalizedVerticesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public Builder removeNormalizedVertices(int index) { - if (normalizedVerticesBuilder_ == null) { - ensureNormalizedVerticesIsMutable(); - normalizedVertices_.remove(index); - onChanged(); - } else { - normalizedVerticesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.automl.v1beta1.NormalizedVertex.Builder getNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.automl.v1beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index) { - if (normalizedVerticesBuilder_ == null) { - return normalizedVertices_.get(index); - } else { - return normalizedVerticesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesOrBuilderList() { - if (normalizedVerticesBuilder_ != null) { - return normalizedVerticesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(normalizedVertices_); - } - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.automl.v1beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder() { - return getNormalizedVerticesFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.NormalizedVertex.getDefaultInstance()); - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public com.google.cloud.automl.v1beta1.NormalizedVertex.Builder addNormalizedVerticesBuilder( - int index) { - return getNormalizedVerticesFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.NormalizedVertex.getDefaultInstance()); - } - /** - * - * - *
-     * Output only . The bounding polygon normalized vertices.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - public java.util.List - getNormalizedVerticesBuilderList() { - return getNormalizedVerticesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.NormalizedVertex, - com.google.cloud.automl.v1beta1.NormalizedVertex.Builder, - com.google.cloud.automl.v1beta1.NormalizedVertexOrBuilder> - getNormalizedVerticesFieldBuilder() { - if (normalizedVerticesBuilder_ == null) { - normalizedVerticesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.NormalizedVertex, - com.google.cloud.automl.v1beta1.NormalizedVertex.Builder, - com.google.cloud.automl.v1beta1.NormalizedVertexOrBuilder>( - normalizedVertices_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - normalizedVertices_ = null; - } - return normalizedVerticesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.BoundingPoly) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.BoundingPoly) - private static final com.google.cloud.automl.v1beta1.BoundingPoly DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.BoundingPoly(); - } - - public static com.google.cloud.automl.v1beta1.BoundingPoly getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public BoundingPoly parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new BoundingPoly(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.BoundingPoly getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPolyOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPolyOrBuilder.java deleted file mode 100644 index d64022c29..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/BoundingPolyOrBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/geometry.proto - -package com.google.cloud.automl.v1beta1; - -public interface BoundingPolyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.BoundingPoly) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List getNormalizedVerticesList(); - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.automl.v1beta1.NormalizedVertex getNormalizedVertices(int index); - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - int getNormalizedVerticesCount(); - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - java.util.List - getNormalizedVerticesOrBuilderList(); - /** - * - * - *
-   * Output only . The bounding polygon normalized vertices.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.NormalizedVertex normalized_vertices = 2; - */ - com.google.cloud.automl.v1beta1.NormalizedVertexOrBuilder getNormalizedVerticesOrBuilder( - int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStats.java deleted file mode 100644 index 217673c5e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStats.java +++ /dev/null @@ -1,1808 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The data statistics of a series of CATEGORY values.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CategoryStats} - */ -public final class CategoryStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.CategoryStats) - CategoryStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use CategoryStats.newBuilder() to construct. - private CategoryStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CategoryStats() { - topCategoryStats_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CategoryStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CategoryStats( - 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)) { - topCategoryStats_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats>(); - mutable_bitField0_ |= 0x00000001; - } - topCategoryStats_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.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)) { - topCategoryStats_ = java.util.Collections.unmodifiableList(topCategoryStats_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CategoryStats.class, - com.google.cloud.automl.v1beta1.CategoryStats.Builder.class); - } - - public interface SingleCategoryStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The CATEGORY value.
-     * 
- * - * string value = 1; - * - * @return The value. - */ - java.lang.String getValue(); - /** - * - * - *
-     * The CATEGORY value.
-     * 
- * - * string value = 1; - * - * @return The bytes for value. - */ - com.google.protobuf.ByteString getValueBytes(); - - /** - * - * - *
-     * The number of occurrences of this value in the series.
-     * 
- * - * int64 count = 2; - * - * @return The count. - */ - long getCount(); - } - /** - * - * - *
-   * The statistics of a single CATEGORY value.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} - */ - public static final class SingleCategoryStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) - SingleCategoryStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use SingleCategoryStats.newBuilder() to construct. - private SingleCategoryStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private SingleCategoryStats() { - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SingleCategoryStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SingleCategoryStats( - 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(); - - value_ = s; - break; - } - case 16: - { - count_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.class, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private volatile java.lang.Object value_; - /** - * - * - *
-     * The CATEGORY value.
-     * 
- * - * string value = 1; - * - * @return The value. - */ - 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; - } - } - /** - * - * - *
-     * The CATEGORY value.
-     * 
- * - * string value = 1; - * - * @return The bytes for value. - */ - 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; - } - } - - public static final int COUNT_FIELD_NUMBER = 2; - private long count_; - /** - * - * - *
-     * The number of occurrences of this value in the series.
-     * 
- * - * int64 count = 2; - * - * @return The count. - */ - public long getCount() { - return count_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); - } - if (count_ != 0L) { - output.writeInt64(2, count_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); - } - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats other = - (com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) obj; - - if (!getValue().equals(other.getValue())) return false; - if (getCount() != other.getCount()) return false; - if (!unknownFields.equals(other.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) + getValue().hashCode(); - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 statistics of a single CATEGORY value.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.class, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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_ = ""; - - count_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats build() { - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats buildPartial() { - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats result = - new com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats(this); - result.value_ = value_; - result.count_ = count_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats other) { - if (other - == com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - .getDefaultInstance()) return this; - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object value_ = ""; - /** - * - * - *
-       * The CATEGORY value.
-       * 
- * - * string value = 1; - * - * @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; - } - } - /** - * - * - *
-       * The CATEGORY value.
-       * 
- * - * string value = 1; - * - * @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; - } - } - /** - * - * - *
-       * The CATEGORY value.
-       * 
- * - * string value = 1; - * - * @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; - } - /** - * - * - *
-       * The CATEGORY value.
-       * 
- * - * string value = 1; - * - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * - * - *
-       * The CATEGORY value.
-       * 
- * - * string value = 1; - * - * @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; - } - - private long count_; - /** - * - * - *
-       * The number of occurrences of this value in the series.
-       * 
- * - * int64 count = 2; - * - * @return The count. - */ - public long getCount() { - return count_; - } - /** - * - * - *
-       * The number of occurrences of this value in the series.
-       * 
- * - * int64 count = 2; - * - * @param value The count to set. - * @return This builder for chaining. - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The number of occurrences of this value in the series.
-       * 
- * - * int64 count = 2; - * - * @return This builder for chaining. - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats) - private static final com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats(); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SingleCategoryStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SingleCategoryStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int TOP_CATEGORY_STATS_FIELD_NUMBER = 1; - private java.util.List - topCategoryStats_; - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public java.util.List - getTopCategoryStatsList() { - return topCategoryStats_; - } - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder> - getTopCategoryStatsOrBuilderList() { - return topCategoryStats_; - } - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public int getTopCategoryStatsCount() { - return topCategoryStats_.size(); - } - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats getTopCategoryStats( - int index) { - return topCategoryStats_.get(index); - } - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder - getTopCategoryStatsOrBuilder(int index) { - return topCategoryStats_.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 < topCategoryStats_.size(); i++) { - output.writeMessage(1, topCategoryStats_.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 < topCategoryStats_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topCategoryStats_.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.automl.v1beta1.CategoryStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.CategoryStats other = - (com.google.cloud.automl.v1beta1.CategoryStats) obj; - - if (!getTopCategoryStatsList().equals(other.getTopCategoryStatsList())) return false; - if (!unknownFields.equals(other.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 (getTopCategoryStatsCount() > 0) { - hash = (37 * hash) + TOP_CATEGORY_STATS_FIELD_NUMBER; - hash = (53 * hash) + getTopCategoryStatsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.CategoryStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data statistics of a series of CATEGORY values.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CategoryStats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.CategoryStats) - com.google.cloud.automl.v1beta1.CategoryStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CategoryStats.class, - com.google.cloud.automl.v1beta1.CategoryStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.CategoryStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopCategoryStatsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (topCategoryStatsBuilder_ == null) { - topCategoryStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topCategoryStatsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CategoryStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats build() { - com.google.cloud.automl.v1beta1.CategoryStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats buildPartial() { - com.google.cloud.automl.v1beta1.CategoryStats result = - new com.google.cloud.automl.v1beta1.CategoryStats(this); - int from_bitField0_ = bitField0_; - if (topCategoryStatsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topCategoryStats_ = java.util.Collections.unmodifiableList(topCategoryStats_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topCategoryStats_ = topCategoryStats_; - } else { - result.topCategoryStats_ = topCategoryStatsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.CategoryStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.CategoryStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.CategoryStats other) { - if (other == com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance()) return this; - if (topCategoryStatsBuilder_ == null) { - if (!other.topCategoryStats_.isEmpty()) { - if (topCategoryStats_.isEmpty()) { - topCategoryStats_ = other.topCategoryStats_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.addAll(other.topCategoryStats_); - } - onChanged(); - } - } else { - if (!other.topCategoryStats_.isEmpty()) { - if (topCategoryStatsBuilder_.isEmpty()) { - topCategoryStatsBuilder_.dispose(); - topCategoryStatsBuilder_ = null; - topCategoryStats_ = other.topCategoryStats_; - bitField0_ = (bitField0_ & ~0x00000001); - topCategoryStatsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTopCategoryStatsFieldBuilder() - : null; - } else { - topCategoryStatsBuilder_.addAllMessages(other.topCategoryStats_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.CategoryStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.CategoryStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - topCategoryStats_ = java.util.Collections.emptyList(); - - private void ensureTopCategoryStatsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topCategoryStats_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats>( - topCategoryStats_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder> - topCategoryStatsBuilder_; - - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public java.util.List - getTopCategoryStatsList() { - if (topCategoryStatsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topCategoryStats_); - } else { - return topCategoryStatsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public int getTopCategoryStatsCount() { - if (topCategoryStatsBuilder_ == null) { - return topCategoryStats_.size(); - } else { - return topCategoryStatsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats getTopCategoryStats( - int index) { - if (topCategoryStatsBuilder_ == null) { - return topCategoryStats_.get(index); - } else { - return topCategoryStatsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder setTopCategoryStats( - int index, com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats value) { - if (topCategoryStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.set(index, value); - onChanged(); - } else { - topCategoryStatsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder setTopCategoryStats( - int index, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder builderForValue) { - if (topCategoryStatsBuilder_ == null) { - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.set(index, builderForValue.build()); - onChanged(); - } else { - topCategoryStatsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder addTopCategoryStats( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats value) { - if (topCategoryStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.add(value); - onChanged(); - } else { - topCategoryStatsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder addTopCategoryStats( - int index, com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats value) { - if (topCategoryStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.add(index, value); - onChanged(); - } else { - topCategoryStatsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder addTopCategoryStats( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder builderForValue) { - if (topCategoryStatsBuilder_ == null) { - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.add(builderForValue.build()); - onChanged(); - } else { - topCategoryStatsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder addTopCategoryStats( - int index, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder builderForValue) { - if (topCategoryStatsBuilder_ == null) { - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.add(index, builderForValue.build()); - onChanged(); - } else { - topCategoryStatsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder addAllTopCategoryStats( - java.lang.Iterable< - ? extends com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats> - values) { - if (topCategoryStatsBuilder_ == null) { - ensureTopCategoryStatsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topCategoryStats_); - onChanged(); - } else { - topCategoryStatsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder clearTopCategoryStats() { - if (topCategoryStatsBuilder_ == null) { - topCategoryStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topCategoryStatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public Builder removeTopCategoryStats(int index) { - if (topCategoryStatsBuilder_ == null) { - ensureTopCategoryStatsIsMutable(); - topCategoryStats_.remove(index); - onChanged(); - } else { - topCategoryStatsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder - getTopCategoryStatsBuilder(int index) { - return getTopCategoryStatsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder - getTopCategoryStatsOrBuilder(int index) { - if (topCategoryStatsBuilder_ == null) { - return topCategoryStats_.get(index); - } else { - return topCategoryStatsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder> - getTopCategoryStatsOrBuilderList() { - if (topCategoryStatsBuilder_ != null) { - return topCategoryStatsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topCategoryStats_); - } - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder - addTopCategoryStatsBuilder() { - return getTopCategoryStatsFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - .getDefaultInstance()); - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder - addTopCategoryStatsBuilder(int index) { - return getTopCategoryStatsFieldBuilder() - .addBuilder( - index, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats - .getDefaultInstance()); - } - /** - * - * - *
-     * The statistics of the top 20 CATEGORY values, ordered by
-     * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - public java.util.List - getTopCategoryStatsBuilderList() { - return getTopCategoryStatsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder> - getTopCategoryStatsFieldBuilder() { - if (topCategoryStatsBuilder_ == null) { - topCategoryStatsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.Builder, - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder>( - topCategoryStats_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - topCategoryStats_ = null; - } - return topCategoryStatsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.CategoryStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.CategoryStats) - private static final com.google.cloud.automl.v1beta1.CategoryStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.CategoryStats(); - } - - public static com.google.cloud.automl.v1beta1.CategoryStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CategoryStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CategoryStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CategoryStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStatsOrBuilder.java deleted file mode 100644 index debb61e75..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CategoryStatsOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface CategoryStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.CategoryStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - java.util.List - getTopCategoryStatsList(); - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats getTopCategoryStats(int index); - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - int getTopCategoryStatsCount(); - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - java.util.List< - ? extends com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder> - getTopCategoryStatsOrBuilderList(); - /** - * - * - *
-   * The statistics of the top 20 CATEGORY values, ordered by
-   * [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count].
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats top_category_stats = 1; - * - */ - com.google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStatsOrBuilder - getTopCategoryStatsOrBuilder(int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ClassificationProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ClassificationProto.java deleted file mode 100644 index 3ab78f262..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ClassificationProto.java +++ /dev/null @@ -1,10000 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/classification.proto - -package com.google.cloud.automl.v1beta1; - -public final class ClassificationProto { - private ClassificationProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - /** - * - * - *
-   * Type of the classification problem.
-   * 
- * - * Protobuf enum {@code google.cloud.automl.v1beta1.ClassificationType} - */ - public enum ClassificationType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * An un-set value of this enum.
-     * 
- * - * CLASSIFICATION_TYPE_UNSPECIFIED = 0; - */ - CLASSIFICATION_TYPE_UNSPECIFIED(0), - /** - * - * - *
-     * At most one label is allowed per example.
-     * 
- * - * MULTICLASS = 1; - */ - MULTICLASS(1), - /** - * - * - *
-     * Multiple labels are allowed for one example.
-     * 
- * - * MULTILABEL = 2; - */ - MULTILABEL(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * An un-set value of this enum.
-     * 
- * - * CLASSIFICATION_TYPE_UNSPECIFIED = 0; - */ - public static final int CLASSIFICATION_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * At most one label is allowed per example.
-     * 
- * - * MULTICLASS = 1; - */ - public static final int MULTICLASS_VALUE = 1; - /** - * - * - *
-     * Multiple labels are allowed for one example.
-     * 
- * - * MULTILABEL = 2; - */ - public static final int MULTILABEL_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 ClassificationType 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 ClassificationType forNumber(int value) { - switch (value) { - case 0: - return CLASSIFICATION_TYPE_UNSPECIFIED; - case 1: - return MULTICLASS; - case 2: - return MULTILABEL; - 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 ClassificationType findValueByNumber(int number) { - return ClassificationType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final ClassificationType[] VALUES = values(); - - public static ClassificationType 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 ClassificationType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.automl.v1beta1.ClassificationType) - } - - public interface ClassificationAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-     * means greater confidence that the annotation is positive. If a user
-     * approves an annotation as negative or positive, the score value remains
-     * unchanged. If a user creates an annotation, the score is 0 for negative or
-     * 1 for positive.
-     * 
- * - * float score = 1; - * - * @return The score. - */ - float getScore(); - } - /** - * - * - *
-   * Contains annotation details specific to classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationAnnotation} - */ - public static final class ClassificationAnnotation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationAnnotation) - ClassificationAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClassificationAnnotation.newBuilder() to construct. - private ClassificationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClassificationAnnotation() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClassificationAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClassificationAnnotation( - 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: - { - score_ = 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.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.class, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - .class); - } - - public static final int SCORE_FIELD_NUMBER = 1; - private float score_; - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-     * means greater confidence that the annotation is positive. If a user
-     * approves an annotation as negative or positive, the score value remains
-     * unchanged. If a user creates an annotation, the score is 0 for negative or
-     * 1 for positive.
-     * 
- * - * float score = 1; - * - * @return The score. - */ - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (score_ != 0F) { - output.writeFloat(1, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation other = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) obj; - - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits(other.getScore())) return false; - if (!unknownFields.equals(other.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) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Contains annotation details specific to classification.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationAnnotation} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationAnnotation) - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.class, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - .class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation build() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - buildPartial() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation result = - new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation(this); - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation other) { - if (other - == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance()) return this; - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float score_; - /** - * - * - *
-       * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-       * means greater confidence that the annotation is positive. If a user
-       * approves an annotation as negative or positive, the score value remains
-       * unchanged. If a user creates an annotation, the score is 0 for negative or
-       * 1 for positive.
-       * 
- * - * float score = 1; - * - * @return The score. - */ - public float getScore() { - return score_; - } - /** - * - * - *
-       * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-       * means greater confidence that the annotation is positive. If a user
-       * approves an annotation as negative or positive, the score value remains
-       * unchanged. If a user creates an annotation, the score is 0 for negative or
-       * 1 for positive.
-       * 
- * - * float score = 1; - * - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-       * means greater confidence that the annotation is positive. If a user
-       * approves an annotation as negative or positive, the score value remains
-       * unchanged. If a user creates an annotation, the score is 0 for negative or
-       * 1 for positive.
-       * 
- * - * float score = 1; - * - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 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.automl.v1beta1.ClassificationAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationAnnotation) - private static final com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationAnnotation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClassificationAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClassificationAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface VideoClassificationAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.VideoClassificationAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. Expresses the type of video classification. Possible values:
-     * *  `segment` - Classification done on a specified by user
-     *        time segment of a video. AnnotationSpec is answered to be present
-     *        in that time segment, if it is present in any part of it. The video
-     *        ML model evaluations are done only for this type of classification.
-     * *  `shot`- Shot-level classification.
-     *        AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no
-     *        metrics provided to describe that quality.
-     * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-     *        confidence scores for each second of the entire segment of the video
-     *        that user specified in the request configuration.
-     *        WARNING: Model evaluation is not done for this classification type,
-     *        the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality.
-     * 
- * - * string type = 1; - * - * @return The type. - */ - java.lang.String getType(); - /** - * - * - *
-     * Output only. Expresses the type of video classification. Possible values:
-     * *  `segment` - Classification done on a specified by user
-     *        time segment of a video. AnnotationSpec is answered to be present
-     *        in that time segment, if it is present in any part of it. The video
-     *        ML model evaluations are done only for this type of classification.
-     * *  `shot`- Shot-level classification.
-     *        AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no
-     *        metrics provided to describe that quality.
-     * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-     *        confidence scores for each second of the entire segment of the video
-     *        that user specified in the request configuration.
-     *        WARNING: Model evaluation is not done for this classification type,
-     *        the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality.
-     * 
- * - * string type = 1; - * - * @return The bytes for type. - */ - com.google.protobuf.ByteString getTypeBytes(); - - /** - * - * - *
-     * Output only . The classification details of this annotation.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - * - * @return Whether the classificationAnnotation field is set. - */ - boolean hasClassificationAnnotation(); - /** - * - * - *
-     * Output only . The classification details of this annotation.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - * - * @return The classificationAnnotation. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getClassificationAnnotation(); - /** - * - * - *
-     * Output only . The classification details of this annotation.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder - getClassificationAnnotationOrBuilder(); - - /** - * - * - *
-     * Output only . The time segment of the video to which the
-     * annotation applies.
-     * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - * - * @return Whether the timeSegment field is set. - */ - boolean hasTimeSegment(); - /** - * - * - *
-     * Output only . The time segment of the video to which the
-     * annotation applies.
-     * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - * - * @return The timeSegment. - */ - com.google.cloud.automl.v1beta1.TimeSegment getTimeSegment(); - /** - * - * - *
-     * Output only . The time segment of the video to which the
-     * annotation applies.
-     * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - com.google.cloud.automl.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder(); - } - /** - * - * - *
-   * Contains annotation details specific to video classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoClassificationAnnotation} - */ - public static final class VideoClassificationAnnotation - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.VideoClassificationAnnotation) - VideoClassificationAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use VideoClassificationAnnotation.newBuilder() to construct. - private VideoClassificationAnnotation( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VideoClassificationAnnotation() { - type_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VideoClassificationAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VideoClassificationAnnotation( - 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(); - - type_ = s; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - subBuilder = null; - if (classificationAnnotation_ != null) { - subBuilder = classificationAnnotation_.toBuilder(); - } - classificationAnnotation_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(classificationAnnotation_); - classificationAnnotation_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.TimeSegment.Builder subBuilder = null; - if (timeSegment_ != null) { - subBuilder = timeSegment_.toBuilder(); - } - timeSegment_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TimeSegment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeSegment_); - timeSegment_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .class, - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .Builder.class); - } - - public static final int TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object type_; - /** - * - * - *
-     * Output only. Expresses the type of video classification. Possible values:
-     * *  `segment` - Classification done on a specified by user
-     *        time segment of a video. AnnotationSpec is answered to be present
-     *        in that time segment, if it is present in any part of it. The video
-     *        ML model evaluations are done only for this type of classification.
-     * *  `shot`- Shot-level classification.
-     *        AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no
-     *        metrics provided to describe that quality.
-     * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-     *        confidence scores for each second of the entire segment of the video
-     *        that user specified in the request configuration.
-     *        WARNING: Model evaluation is not done for this classification type,
-     *        the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality.
-     * 
- * - * string type = 1; - * - * @return The type. - */ - 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; - } - } - /** - * - * - *
-     * Output only. Expresses the type of video classification. Possible values:
-     * *  `segment` - Classification done on a specified by user
-     *        time segment of a video. AnnotationSpec is answered to be present
-     *        in that time segment, if it is present in any part of it. The video
-     *        ML model evaluations are done only for this type of classification.
-     * *  `shot`- Shot-level classification.
-     *        AutoML Video Intelligence determines the boundaries
-     *        for each camera shot in the entire segment of the video that user
-     *        specified in the request configuration. AutoML Video Intelligence
-     *        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 training data, but there are no
-     *        metrics provided to describe that quality.
-     * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-     *        confidence scores for each second of the entire segment of the video
-     *        that user specified in the request configuration.
-     *        WARNING: Model evaluation is not done for this classification type,
-     *        the quality of it depends on training data, but there are no
-     *        metrics provided to describe that quality.
-     * 
- * - * string type = 1; - * - * @return The bytes for type. - */ - 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 CLASSIFICATION_ANNOTATION_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - classificationAnnotation_; - /** - * - * - *
-     * Output only . The classification details of this annotation.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - * - * @return Whether the classificationAnnotation field is set. - */ - public boolean hasClassificationAnnotation() { - return classificationAnnotation_ != null; - } - /** - * - * - *
-     * Output only . The classification details of this annotation.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - * - * @return The classificationAnnotation. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getClassificationAnnotation() { - return classificationAnnotation_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance() - : classificationAnnotation_; - } - /** - * - * - *
-     * Output only . The classification details of this annotation.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder - getClassificationAnnotationOrBuilder() { - return getClassificationAnnotation(); - } - - public static final int TIME_SEGMENT_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.TimeSegment timeSegment_; - /** - * - * - *
-     * Output only . The time segment of the video to which the
-     * annotation applies.
-     * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - * - * @return Whether the timeSegment field is set. - */ - public boolean hasTimeSegment() { - return timeSegment_ != null; - } - /** - * - * - *
-     * Output only . The time segment of the video to which the
-     * annotation applies.
-     * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - * - * @return The timeSegment. - */ - public com.google.cloud.automl.v1beta1.TimeSegment getTimeSegment() { - return timeSegment_ == null - ? com.google.cloud.automl.v1beta1.TimeSegment.getDefaultInstance() - : timeSegment_; - } - /** - * - * - *
-     * Output only . The time segment of the video to which the
-     * annotation applies.
-     * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - public com.google.cloud.automl.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { - return getTimeSegment(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, type_); - } - if (classificationAnnotation_ != null) { - output.writeMessage(2, getClassificationAnnotation()); - } - if (timeSegment_ != null) { - output.writeMessage(3, getTimeSegment()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, type_); - } - if (classificationAnnotation_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, getClassificationAnnotation()); - } - if (timeSegment_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTimeSegment()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation other = - (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) obj; - - if (!getType().equals(other.getType())) return false; - if (hasClassificationAnnotation() != other.hasClassificationAnnotation()) return false; - if (hasClassificationAnnotation()) { - if (!getClassificationAnnotation().equals(other.getClassificationAnnotation())) - return false; - } - if (hasTimeSegment() != other.hasTimeSegment()) return false; - if (hasTimeSegment()) { - if (!getTimeSegment().equals(other.getTimeSegment())) return false; - } - if (!unknownFields.equals(other.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) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + getType().hashCode(); - if (hasClassificationAnnotation()) { - hash = (37 * hash) + CLASSIFICATION_ANNOTATION_FIELD_NUMBER; - hash = (53 * hash) + getClassificationAnnotation().hashCode(); - } - if (hasTimeSegment()) { - hash = (37 * hash) + TIME_SEGMENT_FIELD_NUMBER; - hash = (53 * hash) + getTimeSegment().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Contains annotation details specific to video classification.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoClassificationAnnotation} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.VideoClassificationAnnotation) - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .class, - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - type_ = ""; - - if (classificationAnnotationBuilder_ == null) { - classificationAnnotation_ = null; - } else { - classificationAnnotation_ = null; - classificationAnnotationBuilder_ = null; - } - if (timeSegmentBuilder_ == null) { - timeSegment_ = null; - } else { - timeSegment_ = null; - timeSegmentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - build() { - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - buildPartial() { - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation result = - new com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation( - this); - result.type_ = type_; - if (classificationAnnotationBuilder_ == null) { - result.classificationAnnotation_ = classificationAnnotation_; - } else { - result.classificationAnnotation_ = classificationAnnotationBuilder_.build(); - } - if (timeSegmentBuilder_ == null) { - result.timeSegment_ = timeSegment_; - } else { - result.timeSegment_ = timeSegmentBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation other) { - if (other - == com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - .getDefaultInstance()) return this; - if (!other.getType().isEmpty()) { - type_ = other.type_; - onChanged(); - } - if (other.hasClassificationAnnotation()) { - mergeClassificationAnnotation(other.getClassificationAnnotation()); - } - if (other.hasTimeSegment()) { - mergeTimeSegment(other.getTimeSegment()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object type_ = ""; - /** - * - * - *
-       * Output only. Expresses the type of video classification. Possible values:
-       * *  `segment` - Classification done on a specified by user
-       *        time segment of a video. AnnotationSpec is answered to be present
-       *        in that time segment, if it is present in any part of it. The video
-       *        ML model evaluations are done only for this type of classification.
-       * *  `shot`- Shot-level classification.
-       *        AutoML Video Intelligence determines the boundaries
-       *        for each camera shot in the entire segment of the video that user
-       *        specified in the request configuration. AutoML Video Intelligence
-       *        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 training data, but there are no
-       *        metrics provided to describe that quality.
-       * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-       *        confidence scores for each second of the entire segment of the video
-       *        that user specified in the request configuration.
-       *        WARNING: Model evaluation is not done for this classification type,
-       *        the quality of it depends on training data, but there are no
-       *        metrics provided to describe that quality.
-       * 
- * - * string type = 1; - * - * @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; - } - } - /** - * - * - *
-       * Output only. Expresses the type of video classification. Possible values:
-       * *  `segment` - Classification done on a specified by user
-       *        time segment of a video. AnnotationSpec is answered to be present
-       *        in that time segment, if it is present in any part of it. The video
-       *        ML model evaluations are done only for this type of classification.
-       * *  `shot`- Shot-level classification.
-       *        AutoML Video Intelligence determines the boundaries
-       *        for each camera shot in the entire segment of the video that user
-       *        specified in the request configuration. AutoML Video Intelligence
-       *        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 training data, but there are no
-       *        metrics provided to describe that quality.
-       * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-       *        confidence scores for each second of the entire segment of the video
-       *        that user specified in the request configuration.
-       *        WARNING: Model evaluation is not done for this classification type,
-       *        the quality of it depends on training data, but there are no
-       *        metrics provided to describe that quality.
-       * 
- * - * string type = 1; - * - * @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; - } - } - /** - * - * - *
-       * Output only. Expresses the type of video classification. Possible values:
-       * *  `segment` - Classification done on a specified by user
-       *        time segment of a video. AnnotationSpec is answered to be present
-       *        in that time segment, if it is present in any part of it. The video
-       *        ML model evaluations are done only for this type of classification.
-       * *  `shot`- Shot-level classification.
-       *        AutoML Video Intelligence determines the boundaries
-       *        for each camera shot in the entire segment of the video that user
-       *        specified in the request configuration. AutoML Video Intelligence
-       *        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 training data, but there are no
-       *        metrics provided to describe that quality.
-       * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-       *        confidence scores for each second of the entire segment of the video
-       *        that user specified in the request configuration.
-       *        WARNING: Model evaluation is not done for this classification type,
-       *        the quality of it depends on training data, but there are no
-       *        metrics provided to describe that quality.
-       * 
- * - * string type = 1; - * - * @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; - } - /** - * - * - *
-       * Output only. Expresses the type of video classification. Possible values:
-       * *  `segment` - Classification done on a specified by user
-       *        time segment of a video. AnnotationSpec is answered to be present
-       *        in that time segment, if it is present in any part of it. The video
-       *        ML model evaluations are done only for this type of classification.
-       * *  `shot`- Shot-level classification.
-       *        AutoML Video Intelligence determines the boundaries
-       *        for each camera shot in the entire segment of the video that user
-       *        specified in the request configuration. AutoML Video Intelligence
-       *        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 training data, but there are no
-       *        metrics provided to describe that quality.
-       * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-       *        confidence scores for each second of the entire segment of the video
-       *        that user specified in the request configuration.
-       *        WARNING: Model evaluation is not done for this classification type,
-       *        the quality of it depends on training data, but there are no
-       *        metrics provided to describe that quality.
-       * 
- * - * string type = 1; - * - * @return This builder for chaining. - */ - public Builder clearType() { - - type_ = getDefaultInstance().getType(); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Expresses the type of video classification. Possible values:
-       * *  `segment` - Classification done on a specified by user
-       *        time segment of a video. AnnotationSpec is answered to be present
-       *        in that time segment, if it is present in any part of it. The video
-       *        ML model evaluations are done only for this type of classification.
-       * *  `shot`- Shot-level classification.
-       *        AutoML Video Intelligence determines the boundaries
-       *        for each camera shot in the entire segment of the video that user
-       *        specified in the request configuration. AutoML Video Intelligence
-       *        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 training data, but there are no
-       *        metrics provided to describe that quality.
-       * *  `1s_interval` - AutoML Video Intelligence returns labels and their
-       *        confidence scores for each second of the entire segment of the video
-       *        that user specified in the request configuration.
-       *        WARNING: Model evaluation is not done for this classification type,
-       *        the quality of it depends on training data, but there are no
-       *        metrics provided to describe that quality.
-       * 
- * - * string type = 1; - * - * @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.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - classificationAnnotation_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder> - classificationAnnotationBuilder_; - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - * - * @return Whether the classificationAnnotation field is set. - */ - public boolean hasClassificationAnnotation() { - return classificationAnnotationBuilder_ != null || classificationAnnotation_ != null; - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - * - * @return The classificationAnnotation. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - getClassificationAnnotation() { - if (classificationAnnotationBuilder_ == null) { - return classificationAnnotation_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance() - : classificationAnnotation_; - } else { - return classificationAnnotationBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - public Builder setClassificationAnnotation( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation value) { - if (classificationAnnotationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - classificationAnnotation_ = value; - onChanged(); - } else { - classificationAnnotationBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - public Builder setClassificationAnnotation( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - builderForValue) { - if (classificationAnnotationBuilder_ == null) { - classificationAnnotation_ = builderForValue.build(); - onChanged(); - } else { - classificationAnnotationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - public Builder mergeClassificationAnnotation( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation value) { - if (classificationAnnotationBuilder_ == null) { - if (classificationAnnotation_ != null) { - classificationAnnotation_ = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .newBuilder(classificationAnnotation_) - .mergeFrom(value) - .buildPartial(); - } else { - classificationAnnotation_ = value; - } - onChanged(); - } else { - classificationAnnotationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - public Builder clearClassificationAnnotation() { - if (classificationAnnotationBuilder_ == null) { - classificationAnnotation_ = null; - onChanged(); - } else { - classificationAnnotation_ = null; - classificationAnnotationBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder - getClassificationAnnotationBuilder() { - - onChanged(); - return getClassificationAnnotationFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder - getClassificationAnnotationOrBuilder() { - if (classificationAnnotationBuilder_ != null) { - return classificationAnnotationBuilder_.getMessageOrBuilder(); - } else { - return classificationAnnotation_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .getDefaultInstance() - : classificationAnnotation_; - } - } - /** - * - * - *
-       * Output only . The classification details of this annotation.
-       * 
- * - * .google.cloud.automl.v1beta1.ClassificationAnnotation classification_annotation = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder> - getClassificationAnnotationFieldBuilder() { - if (classificationAnnotationBuilder_ == null) { - classificationAnnotationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationAnnotationOrBuilder>( - getClassificationAnnotation(), getParentForChildren(), isClean()); - classificationAnnotation_ = null; - } - return classificationAnnotationBuilder_; - } - - private com.google.cloud.automl.v1beta1.TimeSegment timeSegment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TimeSegment, - com.google.cloud.automl.v1beta1.TimeSegment.Builder, - com.google.cloud.automl.v1beta1.TimeSegmentOrBuilder> - timeSegmentBuilder_; - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - * - * @return Whether the timeSegment field is set. - */ - public boolean hasTimeSegment() { - return timeSegmentBuilder_ != null || timeSegment_ != null; - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - * - * @return The timeSegment. - */ - public com.google.cloud.automl.v1beta1.TimeSegment getTimeSegment() { - if (timeSegmentBuilder_ == null) { - return timeSegment_ == null - ? com.google.cloud.automl.v1beta1.TimeSegment.getDefaultInstance() - : timeSegment_; - } else { - return timeSegmentBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - public Builder setTimeSegment(com.google.cloud.automl.v1beta1.TimeSegment value) { - if (timeSegmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - timeSegment_ = value; - onChanged(); - } else { - timeSegmentBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - public Builder setTimeSegment( - com.google.cloud.automl.v1beta1.TimeSegment.Builder builderForValue) { - if (timeSegmentBuilder_ == null) { - timeSegment_ = builderForValue.build(); - onChanged(); - } else { - timeSegmentBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - public Builder mergeTimeSegment(com.google.cloud.automl.v1beta1.TimeSegment value) { - if (timeSegmentBuilder_ == null) { - if (timeSegment_ != null) { - timeSegment_ = - com.google.cloud.automl.v1beta1.TimeSegment.newBuilder(timeSegment_) - .mergeFrom(value) - .buildPartial(); - } else { - timeSegment_ = value; - } - onChanged(); - } else { - timeSegmentBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - public Builder clearTimeSegment() { - if (timeSegmentBuilder_ == null) { - timeSegment_ = null; - onChanged(); - } else { - timeSegment_ = null; - timeSegmentBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - public com.google.cloud.automl.v1beta1.TimeSegment.Builder getTimeSegmentBuilder() { - - onChanged(); - return getTimeSegmentFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - public com.google.cloud.automl.v1beta1.TimeSegmentOrBuilder getTimeSegmentOrBuilder() { - if (timeSegmentBuilder_ != null) { - return timeSegmentBuilder_.getMessageOrBuilder(); - } else { - return timeSegment_ == null - ? com.google.cloud.automl.v1beta1.TimeSegment.getDefaultInstance() - : timeSegment_; - } - } - /** - * - * - *
-       * Output only . The time segment of the video to which the
-       * annotation applies.
-       * 
- * - * .google.cloud.automl.v1beta1.TimeSegment time_segment = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TimeSegment, - com.google.cloud.automl.v1beta1.TimeSegment.Builder, - com.google.cloud.automl.v1beta1.TimeSegmentOrBuilder> - getTimeSegmentFieldBuilder() { - if (timeSegmentBuilder_ == null) { - timeSegmentBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TimeSegment, - com.google.cloud.automl.v1beta1.TimeSegment.Builder, - com.google.cloud.automl.v1beta1.TimeSegmentOrBuilder>( - getTimeSegment(), getParentForChildren(), isClean()); - timeSegment_ = null; - } - return timeSegmentBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.VideoClassificationAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.VideoClassificationAnnotation) - private static final com.google.cloud.automl.v1beta1.ClassificationProto - .VideoClassificationAnnotation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoClassificationAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VideoClassificationAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ClassificationEvaluationMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
-     * for the overall evaluation.
-     * 
- * - * float au_prc = 1; - * - * @return The auPrc. - */ - float getAuPrc(); - - /** - * - * - *
-     * Output only. The Area Under Precision-Recall Curve metric based on priors.
-     * Micro-averaged for the overall evaluation.
-     * Deprecated.
-     * 
- * - * float base_au_prc = 2 [deprecated = true]; - * - * @return The baseAuPrc. - */ - @java.lang.Deprecated - float getBaseAuPrc(); - - /** - * - * - *
-     * Output only. The Area Under Receiver Operating Characteristic curve metric.
-     * Micro-averaged for the overall evaluation.
-     * 
- * - * float au_roc = 6; - * - * @return The auRoc. - */ - float getAuRoc(); - - /** - * - * - *
-     * Output only. The Log Loss metric.
-     * 
- * - * float log_loss = 7; - * - * @return The logLoss. - */ - float getLogLoss(); - - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry> - getConfidenceMetricsEntryList(); - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - getConfidenceMetricsEntry(int index); - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - int getConfidenceMetricsEntryCount(); - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - java.util.List< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntryOrBuilderList(); - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntryOrBuilder(int index); - - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for MULTICLASS classification problems where number
-     * of labels is no more than 10.
-     * Only set for model level evaluation, not for evaluation per label.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - * - * @return Whether the confusionMatrix field is set. - */ - boolean hasConfusionMatrix(); - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for MULTICLASS classification problems where number
-     * of labels is no more than 10.
-     * Only set for model level evaluation, not for evaluation per label.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - * - * @return The confusionMatrix. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getConfusionMatrix(); - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for MULTICLASS classification problems where number
-     * of labels is no more than 10.
-     * Only set for model level evaluation, not for evaluation per label.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder - getConfusionMatrixOrBuilder(); - - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @return A list containing the annotationSpecId. - */ - java.util.List getAnnotationSpecIdList(); - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @return The count of annotationSpecId. - */ - int getAnnotationSpecIdCount(); - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - java.lang.String getAnnotationSpecId(int index); - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index); - } - /** - * - * - *
-   * Model evaluation metrics for classification problems.
-   * Note: For Video Classification this metrics only describe quality of the
-   * Video Classification predictions of "segment_classification" type.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} - */ - public static final class ClassificationEvaluationMetrics - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics) - ClassificationEvaluationMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use ClassificationEvaluationMetrics.newBuilder() to construct. - private ClassificationEvaluationMetrics( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ClassificationEvaluationMetrics() { - confidenceMetricsEntry_ = java.util.Collections.emptyList(); - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ClassificationEvaluationMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ClassificationEvaluationMetrics( - 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 13: - { - auPrc_ = input.readFloat(); - break; - } - case 21: - { - baseAuPrc_ = input.readFloat(); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntry_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry>(); - mutable_bitField0_ |= 0x00000001; - } - confidenceMetricsEntry_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry.parser(), - extensionRegistry)); - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder - subBuilder = null; - if (confusionMatrix_ != null) { - subBuilder = confusionMatrix_.toBuilder(); - } - confusionMatrix_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(confusionMatrix_); - confusionMatrix_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - annotationSpecId_.add(s); - break; - } - case 53: - { - auRoc_ = input.readFloat(); - break; - } - case 61: - { - logLoss_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntry_ = java.util.Collections.unmodifiableList(confidenceMetricsEntry_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - annotationSpecId_ = annotationSpecId_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .class, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .Builder.class); - } - - public interface ConfidenceMetricsEntryOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Output only. Metrics are computed with an assumption that the model
-       * never returns predictions with score lower than this value.
-       * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - float getConfidenceThreshold(); - - /** - * - * - *
-       * Output only. Metrics are computed with an assumption that the model
-       * always returns at most this many predictions (ordered by their score,
-       * descendingly), but they all still need to meet the confidence_threshold.
-       * 
- * - * int32 position_threshold = 14; - * - * @return The positionThreshold. - */ - int getPositionThreshold(); - - /** - * - * - *
-       * Output only. Recall (True Positive Rate) for the given confidence
-       * threshold.
-       * 
- * - * float recall = 2; - * - * @return The recall. - */ - float getRecall(); - - /** - * - * - *
-       * Output only. Precision for the given confidence threshold.
-       * 
- * - * float precision = 3; - * - * @return The precision. - */ - float getPrecision(); - - /** - * - * - *
-       * Output only. False Positive Rate for the given confidence threshold.
-       * 
- * - * float false_positive_rate = 8; - * - * @return The falsePositiveRate. - */ - float getFalsePositiveRate(); - - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 4; - * - * @return The f1Score. - */ - float getF1Score(); - - /** - * - * - *
-       * Output only. The Recall (True Positive Rate) when only considering the
-       * label that has the highest prediction score and not below the confidence
-       * threshold for each example.
-       * 
- * - * float recall_at1 = 5; - * - * @return The recallAt1. - */ - float getRecallAt1(); - - /** - * - * - *
-       * Output only. The precision when only considering the label that has the
-       * highest prediction score and not below the confidence threshold for each
-       * example.
-       * 
- * - * float precision_at1 = 6; - * - * @return The precisionAt1. - */ - float getPrecisionAt1(); - - /** - * - * - *
-       * Output only. The False Positive Rate when only considering the label that
-       * has the highest prediction score and not below the confidence threshold
-       * for each example.
-       * 
- * - * float false_positive_rate_at1 = 9; - * - * @return The falsePositiveRateAt1. - */ - float getFalsePositiveRateAt1(); - - /** - * - * - *
-       * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
-       * 
- * - * float f1_score_at1 = 7; - * - * @return The f1ScoreAt1. - */ - float getF1ScoreAt1(); - - /** - * - * - *
-       * Output only. The number of model created labels that match a ground truth
-       * label.
-       * 
- * - * int64 true_positive_count = 10; - * - * @return The truePositiveCount. - */ - long getTruePositiveCount(); - - /** - * - * - *
-       * Output only. The number of model created labels that do not match a
-       * ground truth label.
-       * 
- * - * int64 false_positive_count = 11; - * - * @return The falsePositiveCount. - */ - long getFalsePositiveCount(); - - /** - * - * - *
-       * Output only. The number of ground truth labels that are not matched
-       * by a model created label.
-       * 
- * - * int64 false_negative_count = 12; - * - * @return The falseNegativeCount. - */ - long getFalseNegativeCount(); - - /** - * - * - *
-       * Output only. The number of labels that were not created by the model,
-       * but if they would, they would not match a ground truth label.
-       * 
- * - * int64 true_negative_count = 13; - * - * @return The trueNegativeCount. - */ - long getTrueNegativeCount(); - } - /** - * - * - *
-     * Metrics for a single confidence threshold.
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} - */ - public static final class ConfidenceMetricsEntry extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) - ConfidenceMetricsEntryOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfidenceMetricsEntry.newBuilder() to construct. - private ConfidenceMetricsEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ConfidenceMetricsEntry() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ConfidenceMetricsEntry(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfidenceMetricsEntry( - 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 21: - { - recall_ = input.readFloat(); - break; - } - case 29: - { - precision_ = input.readFloat(); - break; - } - case 37: - { - f1Score_ = input.readFloat(); - break; - } - case 45: - { - recallAt1_ = input.readFloat(); - break; - } - case 53: - { - precisionAt1_ = input.readFloat(); - break; - } - case 61: - { - f1ScoreAt1_ = input.readFloat(); - break; - } - case 69: - { - falsePositiveRate_ = input.readFloat(); - break; - } - case 77: - { - falsePositiveRateAt1_ = input.readFloat(); - break; - } - case 80: - { - truePositiveCount_ = input.readInt64(); - break; - } - case 88: - { - falsePositiveCount_ = input.readInt64(); - break; - } - case 96: - { - falseNegativeCount_ = input.readInt64(); - break; - } - case 104: - { - trueNegativeCount_ = input.readInt64(); - break; - } - case 112: - { - positionThreshold_ = 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.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.class, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder.class); - } - - public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; - private float confidenceThreshold_; - /** - * - * - *
-       * Output only. Metrics are computed with an assumption that the model
-       * never returns predictions with score lower than this value.
-       * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - public float getConfidenceThreshold() { - return confidenceThreshold_; - } - - public static final int POSITION_THRESHOLD_FIELD_NUMBER = 14; - private int positionThreshold_; - /** - * - * - *
-       * Output only. Metrics are computed with an assumption that the model
-       * always returns at most this many predictions (ordered by their score,
-       * descendingly), but they all still need to meet the confidence_threshold.
-       * 
- * - * int32 position_threshold = 14; - * - * @return The positionThreshold. - */ - public int getPositionThreshold() { - return positionThreshold_; - } - - public static final int RECALL_FIELD_NUMBER = 2; - private float recall_; - /** - * - * - *
-       * Output only. Recall (True Positive Rate) for the given confidence
-       * threshold.
-       * 
- * - * float recall = 2; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - - public static final int PRECISION_FIELD_NUMBER = 3; - private float precision_; - /** - * - * - *
-       * Output only. Precision for the given confidence threshold.
-       * 
- * - * float precision = 3; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - - public static final int FALSE_POSITIVE_RATE_FIELD_NUMBER = 8; - private float falsePositiveRate_; - /** - * - * - *
-       * Output only. False Positive Rate for the given confidence threshold.
-       * 
- * - * float false_positive_rate = 8; - * - * @return The falsePositiveRate. - */ - public float getFalsePositiveRate() { - return falsePositiveRate_; - } - - public static final int F1_SCORE_FIELD_NUMBER = 4; - private float f1Score_; - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 4; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - - public static final int RECALL_AT1_FIELD_NUMBER = 5; - private float recallAt1_; - /** - * - * - *
-       * Output only. The Recall (True Positive Rate) when only considering the
-       * label that has the highest prediction score and not below the confidence
-       * threshold for each example.
-       * 
- * - * float recall_at1 = 5; - * - * @return The recallAt1. - */ - public float getRecallAt1() { - return recallAt1_; - } - - public static final int PRECISION_AT1_FIELD_NUMBER = 6; - private float precisionAt1_; - /** - * - * - *
-       * Output only. The precision when only considering the label that has the
-       * highest prediction score and not below the confidence threshold for each
-       * example.
-       * 
- * - * float precision_at1 = 6; - * - * @return The precisionAt1. - */ - public float getPrecisionAt1() { - return precisionAt1_; - } - - public static final int FALSE_POSITIVE_RATE_AT1_FIELD_NUMBER = 9; - private float falsePositiveRateAt1_; - /** - * - * - *
-       * Output only. The False Positive Rate when only considering the label that
-       * has the highest prediction score and not below the confidence threshold
-       * for each example.
-       * 
- * - * float false_positive_rate_at1 = 9; - * - * @return The falsePositiveRateAt1. - */ - public float getFalsePositiveRateAt1() { - return falsePositiveRateAt1_; - } - - public static final int F1_SCORE_AT1_FIELD_NUMBER = 7; - private float f1ScoreAt1_; - /** - * - * - *
-       * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
-       * 
- * - * float f1_score_at1 = 7; - * - * @return The f1ScoreAt1. - */ - public float getF1ScoreAt1() { - return f1ScoreAt1_; - } - - public static final int TRUE_POSITIVE_COUNT_FIELD_NUMBER = 10; - private long truePositiveCount_; - /** - * - * - *
-       * Output only. The number of model created labels that match a ground truth
-       * label.
-       * 
- * - * int64 true_positive_count = 10; - * - * @return The truePositiveCount. - */ - public long getTruePositiveCount() { - return truePositiveCount_; - } - - public static final int FALSE_POSITIVE_COUNT_FIELD_NUMBER = 11; - private long falsePositiveCount_; - /** - * - * - *
-       * Output only. The number of model created labels that do not match a
-       * ground truth label.
-       * 
- * - * int64 false_positive_count = 11; - * - * @return The falsePositiveCount. - */ - public long getFalsePositiveCount() { - return falsePositiveCount_; - } - - public static final int FALSE_NEGATIVE_COUNT_FIELD_NUMBER = 12; - private long falseNegativeCount_; - /** - * - * - *
-       * Output only. The number of ground truth labels that are not matched
-       * by a model created label.
-       * 
- * - * int64 false_negative_count = 12; - * - * @return The falseNegativeCount. - */ - public long getFalseNegativeCount() { - return falseNegativeCount_; - } - - public static final int TRUE_NEGATIVE_COUNT_FIELD_NUMBER = 13; - private long trueNegativeCount_; - /** - * - * - *
-       * Output only. The number of labels that were not created by the model,
-       * but if they would, they would not match a ground truth label.
-       * 
- * - * int64 true_negative_count = 13; - * - * @return The trueNegativeCount. - */ - public long getTrueNegativeCount() { - return trueNegativeCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (recall_ != 0F) { - output.writeFloat(2, recall_); - } - if (precision_ != 0F) { - output.writeFloat(3, precision_); - } - if (f1Score_ != 0F) { - output.writeFloat(4, f1Score_); - } - if (recallAt1_ != 0F) { - output.writeFloat(5, recallAt1_); - } - if (precisionAt1_ != 0F) { - output.writeFloat(6, precisionAt1_); - } - if (f1ScoreAt1_ != 0F) { - output.writeFloat(7, f1ScoreAt1_); - } - if (falsePositiveRate_ != 0F) { - output.writeFloat(8, falsePositiveRate_); - } - if (falsePositiveRateAt1_ != 0F) { - output.writeFloat(9, falsePositiveRateAt1_); - } - if (truePositiveCount_ != 0L) { - output.writeInt64(10, truePositiveCount_); - } - if (falsePositiveCount_ != 0L) { - output.writeInt64(11, falsePositiveCount_); - } - if (falseNegativeCount_ != 0L) { - output.writeInt64(12, falseNegativeCount_); - } - if (trueNegativeCount_ != 0L) { - output.writeInt64(13, trueNegativeCount_); - } - if (positionThreshold_ != 0) { - output.writeInt32(14, positionThreshold_); - } - 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 (recall_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, recall_); - } - if (precision_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, precision_); - } - if (f1Score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, f1Score_); - } - if (recallAt1_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, recallAt1_); - } - if (precisionAt1_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, precisionAt1_); - } - if (f1ScoreAt1_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, f1ScoreAt1_); - } - if (falsePositiveRate_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, falsePositiveRate_); - } - if (falsePositiveRateAt1_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(9, falsePositiveRateAt1_); - } - if (truePositiveCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, truePositiveCount_); - } - if (falsePositiveCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, falsePositiveCount_); - } - if (falseNegativeCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(12, falseNegativeCount_); - } - if (trueNegativeCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(13, trueNegativeCount_); - } - if (positionThreshold_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(14, positionThreshold_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - other = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry) - obj; - - if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) - != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; - if (getPositionThreshold() != other.getPositionThreshold()) return false; - if (java.lang.Float.floatToIntBits(getRecall()) - != java.lang.Float.floatToIntBits(other.getRecall())) return false; - if (java.lang.Float.floatToIntBits(getPrecision()) - != java.lang.Float.floatToIntBits(other.getPrecision())) return false; - if (java.lang.Float.floatToIntBits(getFalsePositiveRate()) - != java.lang.Float.floatToIntBits(other.getFalsePositiveRate())) return false; - if (java.lang.Float.floatToIntBits(getF1Score()) - != java.lang.Float.floatToIntBits(other.getF1Score())) return false; - if (java.lang.Float.floatToIntBits(getRecallAt1()) - != java.lang.Float.floatToIntBits(other.getRecallAt1())) return false; - if (java.lang.Float.floatToIntBits(getPrecisionAt1()) - != java.lang.Float.floatToIntBits(other.getPrecisionAt1())) return false; - if (java.lang.Float.floatToIntBits(getFalsePositiveRateAt1()) - != java.lang.Float.floatToIntBits(other.getFalsePositiveRateAt1())) return false; - if (java.lang.Float.floatToIntBits(getF1ScoreAt1()) - != java.lang.Float.floatToIntBits(other.getF1ScoreAt1())) return false; - if (getTruePositiveCount() != other.getTruePositiveCount()) return false; - if (getFalsePositiveCount() != other.getFalsePositiveCount()) return false; - if (getFalseNegativeCount() != other.getFalseNegativeCount()) return false; - if (getTrueNegativeCount() != other.getTrueNegativeCount()) return false; - if (!unknownFields.equals(other.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) + POSITION_THRESHOLD_FIELD_NUMBER; - hash = (53 * hash) + getPositionThreshold(); - hash = (37 * hash) + RECALL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecall()); - hash = (37 * hash) + PRECISION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getPrecision()); - hash = (37 * hash) + FALSE_POSITIVE_RATE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getFalsePositiveRate()); - hash = (37 * hash) + F1_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getF1Score()); - hash = (37 * hash) + RECALL_AT1_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecallAt1()); - hash = (37 * hash) + PRECISION_AT1_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getPrecisionAt1()); - hash = (37 * hash) + FALSE_POSITIVE_RATE_AT1_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getFalsePositiveRateAt1()); - hash = (37 * hash) + F1_SCORE_AT1_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getF1ScoreAt1()); - hash = (37 * hash) + TRUE_POSITIVE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTruePositiveCount()); - hash = (37 * hash) + FALSE_POSITIVE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFalsePositiveCount()); - hash = (37 * hash) + FALSE_NEGATIVE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFalseNegativeCount()); - hash = (37 * hash) + TRUE_NEGATIVE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrueNegativeCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Metrics for a single confidence threshold.
-       * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry.class, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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; - - positionThreshold_ = 0; - - recall_ = 0F; - - precision_ = 0F; - - falsePositiveRate_ = 0F; - - f1Score_ = 0F; - - recallAt1_ = 0F; - - precisionAt1_ = 0F; - - falsePositiveRateAt1_ = 0F; - - f1ScoreAt1_ = 0F; - - truePositiveCount_ = 0L; - - falsePositiveCount_ = 0L; - - falseNegativeCount_ = 0L; - - trueNegativeCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - build() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - buildPartial() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - result = - new com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry(this); - result.confidenceThreshold_ = confidenceThreshold_; - result.positionThreshold_ = positionThreshold_; - result.recall_ = recall_; - result.precision_ = precision_; - result.falsePositiveRate_ = falsePositiveRate_; - result.f1Score_ = f1Score_; - result.recallAt1_ = recallAt1_; - result.precisionAt1_ = precisionAt1_; - result.falsePositiveRateAt1_ = falsePositiveRateAt1_; - result.f1ScoreAt1_ = f1ScoreAt1_; - result.truePositiveCount_ = truePositiveCount_; - result.falsePositiveCount_ = falsePositiveCount_; - result.falseNegativeCount_ = falseNegativeCount_; - result.trueNegativeCount_ = trueNegativeCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - other) { - if (other - == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.getDefaultInstance()) return this; - if (other.getConfidenceThreshold() != 0F) { - setConfidenceThreshold(other.getConfidenceThreshold()); - } - if (other.getPositionThreshold() != 0) { - setPositionThreshold(other.getPositionThreshold()); - } - if (other.getRecall() != 0F) { - setRecall(other.getRecall()); - } - if (other.getPrecision() != 0F) { - setPrecision(other.getPrecision()); - } - if (other.getFalsePositiveRate() != 0F) { - setFalsePositiveRate(other.getFalsePositiveRate()); - } - if (other.getF1Score() != 0F) { - setF1Score(other.getF1Score()); - } - if (other.getRecallAt1() != 0F) { - setRecallAt1(other.getRecallAt1()); - } - if (other.getPrecisionAt1() != 0F) { - setPrecisionAt1(other.getPrecisionAt1()); - } - if (other.getFalsePositiveRateAt1() != 0F) { - setFalsePositiveRateAt1(other.getFalsePositiveRateAt1()); - } - if (other.getF1ScoreAt1() != 0F) { - setF1ScoreAt1(other.getF1ScoreAt1()); - } - if (other.getTruePositiveCount() != 0L) { - setTruePositiveCount(other.getTruePositiveCount()); - } - if (other.getFalsePositiveCount() != 0L) { - setFalsePositiveCount(other.getFalsePositiveCount()); - } - if (other.getFalseNegativeCount() != 0L) { - setFalseNegativeCount(other.getFalseNegativeCount()); - } - if (other.getTrueNegativeCount() != 0L) { - setTrueNegativeCount(other.getTrueNegativeCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float confidenceThreshold_; - /** - * - * - *
-         * Output only. Metrics are computed with an assumption that the model
-         * never returns predictions with score lower than this value.
-         * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - public float getConfidenceThreshold() { - return confidenceThreshold_; - } - /** - * - * - *
-         * Output only. Metrics are computed with an assumption that the model
-         * never returns predictions with score lower than this value.
-         * 
- * - * 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; - } - /** - * - * - *
-         * Output only. Metrics are computed with an assumption that the model
-         * never returns predictions with score lower than this value.
-         * 
- * - * float confidence_threshold = 1; - * - * @return This builder for chaining. - */ - public Builder clearConfidenceThreshold() { - - confidenceThreshold_ = 0F; - onChanged(); - return this; - } - - private int positionThreshold_; - /** - * - * - *
-         * Output only. Metrics are computed with an assumption that the model
-         * always returns at most this many predictions (ordered by their score,
-         * descendingly), but they all still need to meet the confidence_threshold.
-         * 
- * - * int32 position_threshold = 14; - * - * @return The positionThreshold. - */ - public int getPositionThreshold() { - return positionThreshold_; - } - /** - * - * - *
-         * Output only. Metrics are computed with an assumption that the model
-         * always returns at most this many predictions (ordered by their score,
-         * descendingly), but they all still need to meet the confidence_threshold.
-         * 
- * - * int32 position_threshold = 14; - * - * @param value The positionThreshold to set. - * @return This builder for chaining. - */ - public Builder setPositionThreshold(int value) { - - positionThreshold_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. Metrics are computed with an assumption that the model
-         * always returns at most this many predictions (ordered by their score,
-         * descendingly), but they all still need to meet the confidence_threshold.
-         * 
- * - * int32 position_threshold = 14; - * - * @return This builder for chaining. - */ - public Builder clearPositionThreshold() { - - positionThreshold_ = 0; - onChanged(); - return this; - } - - private float recall_; - /** - * - * - *
-         * Output only. Recall (True Positive Rate) for the given confidence
-         * threshold.
-         * 
- * - * float recall = 2; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - /** - * - * - *
-         * Output only. Recall (True Positive Rate) for the given confidence
-         * threshold.
-         * 
- * - * float recall = 2; - * - * @param value The recall to set. - * @return This builder for chaining. - */ - public Builder setRecall(float value) { - - recall_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. Recall (True Positive Rate) for the given confidence
-         * threshold.
-         * 
- * - * float recall = 2; - * - * @return This builder for chaining. - */ - public Builder clearRecall() { - - recall_ = 0F; - onChanged(); - return this; - } - - private float precision_; - /** - * - * - *
-         * Output only. Precision for the given confidence threshold.
-         * 
- * - * float precision = 3; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - /** - * - * - *
-         * Output only. Precision for the given confidence threshold.
-         * 
- * - * float precision = 3; - * - * @param value The precision to set. - * @return This builder for chaining. - */ - public Builder setPrecision(float value) { - - precision_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. Precision for the given confidence threshold.
-         * 
- * - * float precision = 3; - * - * @return This builder for chaining. - */ - public Builder clearPrecision() { - - precision_ = 0F; - onChanged(); - return this; - } - - private float falsePositiveRate_; - /** - * - * - *
-         * Output only. False Positive Rate for the given confidence threshold.
-         * 
- * - * float false_positive_rate = 8; - * - * @return The falsePositiveRate. - */ - public float getFalsePositiveRate() { - return falsePositiveRate_; - } - /** - * - * - *
-         * Output only. False Positive Rate for the given confidence threshold.
-         * 
- * - * float false_positive_rate = 8; - * - * @param value The falsePositiveRate to set. - * @return This builder for chaining. - */ - public Builder setFalsePositiveRate(float value) { - - falsePositiveRate_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. False Positive Rate for the given confidence threshold.
-         * 
- * - * float false_positive_rate = 8; - * - * @return This builder for chaining. - */ - public Builder clearFalsePositiveRate() { - - falsePositiveRate_ = 0F; - onChanged(); - return this; - } - - private float f1Score_; - /** - * - * - *
-         * Output only. The harmonic mean of recall and precision.
-         * 
- * - * float f1_score = 4; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - /** - * - * - *
-         * Output only. The harmonic mean of recall and precision.
-         * 
- * - * float f1_score = 4; - * - * @param value The f1Score to set. - * @return This builder for chaining. - */ - public Builder setF1Score(float value) { - - f1Score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The harmonic mean of recall and precision.
-         * 
- * - * float f1_score = 4; - * - * @return This builder for chaining. - */ - public Builder clearF1Score() { - - f1Score_ = 0F; - onChanged(); - return this; - } - - private float recallAt1_; - /** - * - * - *
-         * Output only. The Recall (True Positive Rate) when only considering the
-         * label that has the highest prediction score and not below the confidence
-         * threshold for each example.
-         * 
- * - * float recall_at1 = 5; - * - * @return The recallAt1. - */ - public float getRecallAt1() { - return recallAt1_; - } - /** - * - * - *
-         * Output only. The Recall (True Positive Rate) when only considering the
-         * label that has the highest prediction score and not below the confidence
-         * threshold for each example.
-         * 
- * - * float recall_at1 = 5; - * - * @param value The recallAt1 to set. - * @return This builder for chaining. - */ - public Builder setRecallAt1(float value) { - - recallAt1_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The Recall (True Positive Rate) when only considering the
-         * label that has the highest prediction score and not below the confidence
-         * threshold for each example.
-         * 
- * - * float recall_at1 = 5; - * - * @return This builder for chaining. - */ - public Builder clearRecallAt1() { - - recallAt1_ = 0F; - onChanged(); - return this; - } - - private float precisionAt1_; - /** - * - * - *
-         * Output only. The precision when only considering the label that has the
-         * highest prediction score and not below the confidence threshold for each
-         * example.
-         * 
- * - * float precision_at1 = 6; - * - * @return The precisionAt1. - */ - public float getPrecisionAt1() { - return precisionAt1_; - } - /** - * - * - *
-         * Output only. The precision when only considering the label that has the
-         * highest prediction score and not below the confidence threshold for each
-         * example.
-         * 
- * - * float precision_at1 = 6; - * - * @param value The precisionAt1 to set. - * @return This builder for chaining. - */ - public Builder setPrecisionAt1(float value) { - - precisionAt1_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The precision when only considering the label that has the
-         * highest prediction score and not below the confidence threshold for each
-         * example.
-         * 
- * - * float precision_at1 = 6; - * - * @return This builder for chaining. - */ - public Builder clearPrecisionAt1() { - - precisionAt1_ = 0F; - onChanged(); - return this; - } - - private float falsePositiveRateAt1_; - /** - * - * - *
-         * Output only. The False Positive Rate when only considering the label that
-         * has the highest prediction score and not below the confidence threshold
-         * for each example.
-         * 
- * - * float false_positive_rate_at1 = 9; - * - * @return The falsePositiveRateAt1. - */ - public float getFalsePositiveRateAt1() { - return falsePositiveRateAt1_; - } - /** - * - * - *
-         * Output only. The False Positive Rate when only considering the label that
-         * has the highest prediction score and not below the confidence threshold
-         * for each example.
-         * 
- * - * float false_positive_rate_at1 = 9; - * - * @param value The falsePositiveRateAt1 to set. - * @return This builder for chaining. - */ - public Builder setFalsePositiveRateAt1(float value) { - - falsePositiveRateAt1_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The False Positive Rate when only considering the label that
-         * has the highest prediction score and not below the confidence threshold
-         * for each example.
-         * 
- * - * float false_positive_rate_at1 = 9; - * - * @return This builder for chaining. - */ - public Builder clearFalsePositiveRateAt1() { - - falsePositiveRateAt1_ = 0F; - onChanged(); - return this; - } - - private float f1ScoreAt1_; - /** - * - * - *
-         * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
-         * 
- * - * float f1_score_at1 = 7; - * - * @return The f1ScoreAt1. - */ - public float getF1ScoreAt1() { - return f1ScoreAt1_; - } - /** - * - * - *
-         * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
-         * 
- * - * float f1_score_at1 = 7; - * - * @param value The f1ScoreAt1 to set. - * @return This builder for chaining. - */ - public Builder setF1ScoreAt1(float value) { - - f1ScoreAt1_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
-         * 
- * - * float f1_score_at1 = 7; - * - * @return This builder for chaining. - */ - public Builder clearF1ScoreAt1() { - - f1ScoreAt1_ = 0F; - onChanged(); - return this; - } - - private long truePositiveCount_; - /** - * - * - *
-         * Output only. The number of model created labels that match a ground truth
-         * label.
-         * 
- * - * int64 true_positive_count = 10; - * - * @return The truePositiveCount. - */ - public long getTruePositiveCount() { - return truePositiveCount_; - } - /** - * - * - *
-         * Output only. The number of model created labels that match a ground truth
-         * label.
-         * 
- * - * int64 true_positive_count = 10; - * - * @param value The truePositiveCount to set. - * @return This builder for chaining. - */ - public Builder setTruePositiveCount(long value) { - - truePositiveCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The number of model created labels that match a ground truth
-         * label.
-         * 
- * - * int64 true_positive_count = 10; - * - * @return This builder for chaining. - */ - public Builder clearTruePositiveCount() { - - truePositiveCount_ = 0L; - onChanged(); - return this; - } - - private long falsePositiveCount_; - /** - * - * - *
-         * Output only. The number of model created labels that do not match a
-         * ground truth label.
-         * 
- * - * int64 false_positive_count = 11; - * - * @return The falsePositiveCount. - */ - public long getFalsePositiveCount() { - return falsePositiveCount_; - } - /** - * - * - *
-         * Output only. The number of model created labels that do not match a
-         * ground truth label.
-         * 
- * - * int64 false_positive_count = 11; - * - * @param value The falsePositiveCount to set. - * @return This builder for chaining. - */ - public Builder setFalsePositiveCount(long value) { - - falsePositiveCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The number of model created labels that do not match a
-         * ground truth label.
-         * 
- * - * int64 false_positive_count = 11; - * - * @return This builder for chaining. - */ - public Builder clearFalsePositiveCount() { - - falsePositiveCount_ = 0L; - onChanged(); - return this; - } - - private long falseNegativeCount_; - /** - * - * - *
-         * Output only. The number of ground truth labels that are not matched
-         * by a model created label.
-         * 
- * - * int64 false_negative_count = 12; - * - * @return The falseNegativeCount. - */ - public long getFalseNegativeCount() { - return falseNegativeCount_; - } - /** - * - * - *
-         * Output only. The number of ground truth labels that are not matched
-         * by a model created label.
-         * 
- * - * int64 false_negative_count = 12; - * - * @param value The falseNegativeCount to set. - * @return This builder for chaining. - */ - public Builder setFalseNegativeCount(long value) { - - falseNegativeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The number of ground truth labels that are not matched
-         * by a model created label.
-         * 
- * - * int64 false_negative_count = 12; - * - * @return This builder for chaining. - */ - public Builder clearFalseNegativeCount() { - - falseNegativeCount_ = 0L; - onChanged(); - return this; - } - - private long trueNegativeCount_; - /** - * - * - *
-         * Output only. The number of labels that were not created by the model,
-         * but if they would, they would not match a ground truth label.
-         * 
- * - * int64 true_negative_count = 13; - * - * @return The trueNegativeCount. - */ - public long getTrueNegativeCount() { - return trueNegativeCount_; - } - /** - * - * - *
-         * Output only. The number of labels that were not created by the model,
-         * but if they would, they would not match a ground truth label.
-         * 
- * - * int64 true_negative_count = 13; - * - * @param value The trueNegativeCount to set. - * @return This builder for chaining. - */ - public Builder setTrueNegativeCount(long value) { - - trueNegativeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. The number of labels that were not created by the model,
-         * but if they would, they would not match a ground truth label.
-         * 
- * - * int64 true_negative_count = 13; - * - * @return This builder for chaining. - */ - public Builder clearTrueNegativeCount() { - - trueNegativeCount_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry) - private static final com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry(); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConfidenceMetricsEntry parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfidenceMetricsEntry(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ConfusionMatrixOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @return A list containing the annotationSpecId. - */ - java.util.List getAnnotationSpecIdList(); - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @return The count of annotationSpecId. - */ - int getAnnotationSpecIdCount(); - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - java.lang.String getAnnotationSpecId(int index); - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index); - - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @return A list containing the displayName. - */ - java.util.List getDisplayNameList(); - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @return The count of displayName. - */ - int getDisplayNameCount(); - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @param index The index of the element to return. - * @return The displayName at the given index. - */ - java.lang.String getDisplayName(int index); - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @param index The index of the value to return. - * @return The bytes of the displayName at the given index. - */ - com.google.protobuf.ByteString getDisplayNameBytes(int index); - - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row> - getRowList(); - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - getRow(int index); - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - int getRowCount(); - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - java.util.List< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> - getRowOrBuilderList(); - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.RowOrBuilder - getRowOrBuilder(int index); - } - /** - * - * - *
-     * Confusion matrix of the model running the classification.
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} - */ - public static final class ConfusionMatrix extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix) - ConfusionMatrixOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfusionMatrix.newBuilder() to construct. - private ConfusionMatrix(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ConfusionMatrix() { - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - displayName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - row_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ConfusionMatrix(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfusionMatrix( - 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)) { - annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - annotationSpecId_.add(s); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - row_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row>(); - mutable_bitField0_ |= 0x00000004; - } - row_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.parser(), - extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - displayName_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - displayName_.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)) { - annotationSpecId_ = annotationSpecId_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - row_ = java.util.Collections.unmodifiableList(row_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - displayName_ = displayName_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.class, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder.class); - } - - public interface RowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-         * Output only. Value of the specific cell in the confusion matrix.
-         * The number of values each row has (i.e. the length of the row) is equal
-         * to the length of the `annotation_spec_id` field or, if that one is not
-         * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-         * 
- * - * repeated int32 example_count = 1; - * - * @return A list containing the exampleCount. - */ - java.util.List getExampleCountList(); - /** - * - * - *
-         * Output only. Value of the specific cell in the confusion matrix.
-         * The number of values each row has (i.e. the length of the row) is equal
-         * to the length of the `annotation_spec_id` field or, if that one is not
-         * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-         * 
- * - * repeated int32 example_count = 1; - * - * @return The count of exampleCount. - */ - int getExampleCountCount(); - /** - * - * - *
-         * Output only. Value of the specific cell in the confusion matrix.
-         * The number of values each row has (i.e. the length of the row) is equal
-         * to the length of the `annotation_spec_id` field or, if that one is not
-         * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-         * 
- * - * repeated int32 example_count = 1; - * - * @param index The index of the element to return. - * @return The exampleCount at the given index. - */ - int getExampleCount(int index); - } - /** - * - * - *
-       * Output only. A row in the confusion matrix.
-       * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} - */ - public static final class Row extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) - RowOrBuilder { - private static final long serialVersionUID = 0L; - // Use Row.newBuilder() to construct. - private Row(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Row() { - exampleCount_ = emptyIntList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Row(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Row( - 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)) { - exampleCount_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - exampleCount_.addInt(input.readInt32()); - break; - } - case 10: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) - && input.getBytesUntilLimit() > 0) { - exampleCount_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - exampleCount_.addInt(input.readInt32()); - } - 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)) { - exampleCount_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.class, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder.class); - } - - public static final int EXAMPLE_COUNT_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.IntList exampleCount_; - /** - * - * - *
-         * Output only. Value of the specific cell in the confusion matrix.
-         * The number of values each row has (i.e. the length of the row) is equal
-         * to the length of the `annotation_spec_id` field or, if that one is not
-         * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-         * 
- * - * repeated int32 example_count = 1; - * - * @return A list containing the exampleCount. - */ - public java.util.List getExampleCountList() { - return exampleCount_; - } - /** - * - * - *
-         * Output only. Value of the specific cell in the confusion matrix.
-         * The number of values each row has (i.e. the length of the row) is equal
-         * to the length of the `annotation_spec_id` field or, if that one is not
-         * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-         * 
- * - * repeated int32 example_count = 1; - * - * @return The count of exampleCount. - */ - public int getExampleCountCount() { - return exampleCount_.size(); - } - /** - * - * - *
-         * Output only. Value of the specific cell in the confusion matrix.
-         * The number of values each row has (i.e. the length of the row) is equal
-         * to the length of the `annotation_spec_id` field or, if that one is not
-         * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-         * 
- * - * repeated int32 example_count = 1; - * - * @param index The index of the element to return. - * @return The exampleCount at the given index. - */ - public int getExampleCount(int index) { - return exampleCount_.getInt(index); - } - - private int exampleCountMemoizedSerializedSize = -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 (getExampleCountList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(exampleCountMemoizedSerializedSize); - } - for (int i = 0; i < exampleCount_.size(); i++) { - output.writeInt32NoTag(exampleCount_.getInt(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 < exampleCount_.size(); i++) { - dataSize += - com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag( - exampleCount_.getInt(i)); - } - size += dataSize; - if (!getExampleCountList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - exampleCountMemoizedSerializedSize = 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.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - other = - (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row) - obj; - - if (!getExampleCountList().equals(other.getExampleCountList())) return false; - if (!unknownFields.equals(other.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 (getExampleCountCount() > 0) { - hash = (37 * hash) + EXAMPLE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getExampleCountList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 only. A row in the confusion matrix.
-         * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.RowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.class, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.Row.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - exampleCount_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - build() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - buildPartial() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - result = - new com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - exampleCount_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.exampleCount_ = exampleCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - other) { - if (other - == com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance()) - return this; - if (!other.exampleCount_.isEmpty()) { - if (exampleCount_.isEmpty()) { - exampleCount_ = other.exampleCount_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureExampleCountIsMutable(); - exampleCount_.addAll(other.exampleCount_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.Internal.IntList exampleCount_ = emptyIntList(); - - private void ensureExampleCountIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - exampleCount_ = mutableCopy(exampleCount_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-           * Output only. Value of the specific cell in the confusion matrix.
-           * The number of values each row has (i.e. the length of the row) is equal
-           * to the length of the `annotation_spec_id` field or, if that one is not
-           * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-           * 
- * - * repeated int32 example_count = 1; - * - * @return A list containing the exampleCount. - */ - public java.util.List getExampleCountList() { - return ((bitField0_ & 0x00000001) != 0) - ? java.util.Collections.unmodifiableList(exampleCount_) - : exampleCount_; - } - /** - * - * - *
-           * Output only. Value of the specific cell in the confusion matrix.
-           * The number of values each row has (i.e. the length of the row) is equal
-           * to the length of the `annotation_spec_id` field or, if that one is not
-           * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-           * 
- * - * repeated int32 example_count = 1; - * - * @return The count of exampleCount. - */ - public int getExampleCountCount() { - return exampleCount_.size(); - } - /** - * - * - *
-           * Output only. Value of the specific cell in the confusion matrix.
-           * The number of values each row has (i.e. the length of the row) is equal
-           * to the length of the `annotation_spec_id` field or, if that one is not
-           * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-           * 
- * - * repeated int32 example_count = 1; - * - * @param index The index of the element to return. - * @return The exampleCount at the given index. - */ - public int getExampleCount(int index) { - return exampleCount_.getInt(index); - } - /** - * - * - *
-           * Output only. Value of the specific cell in the confusion matrix.
-           * The number of values each row has (i.e. the length of the row) is equal
-           * to the length of the `annotation_spec_id` field or, if that one is not
-           * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-           * 
- * - * repeated int32 example_count = 1; - * - * @param index The index to set the value at. - * @param value The exampleCount to set. - * @return This builder for chaining. - */ - public Builder setExampleCount(int index, int value) { - ensureExampleCountIsMutable(); - exampleCount_.setInt(index, value); - onChanged(); - return this; - } - /** - * - * - *
-           * Output only. Value of the specific cell in the confusion matrix.
-           * The number of values each row has (i.e. the length of the row) is equal
-           * to the length of the `annotation_spec_id` field or, if that one is not
-           * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-           * 
- * - * repeated int32 example_count = 1; - * - * @param value The exampleCount to add. - * @return This builder for chaining. - */ - public Builder addExampleCount(int value) { - ensureExampleCountIsMutable(); - exampleCount_.addInt(value); - onChanged(); - return this; - } - /** - * - * - *
-           * Output only. Value of the specific cell in the confusion matrix.
-           * The number of values each row has (i.e. the length of the row) is equal
-           * to the length of the `annotation_spec_id` field or, if that one is not
-           * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-           * 
- * - * repeated int32 example_count = 1; - * - * @param values The exampleCount to add. - * @return This builder for chaining. - */ - public Builder addAllExampleCount( - java.lang.Iterable values) { - ensureExampleCountIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exampleCount_); - onChanged(); - return this; - } - /** - * - * - *
-           * Output only. Value of the specific cell in the confusion matrix.
-           * The number of values each row has (i.e. the length of the row) is equal
-           * to the length of the `annotation_spec_id` field or, if that one is not
-           * populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field.
-           * 
- * - * repeated int32 example_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearExampleCount() { - exampleCount_ = emptyIntList(); - 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.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row) - private static final com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row(); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Row parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Row(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList annotationSpecId_; - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @return A list containing the annotationSpecId. - */ - public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() { - return annotationSpecId_; - } - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @return The count of annotationSpecId. - */ - public int getAnnotationSpecIdCount() { - return annotationSpecId_.size(); - } - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - public java.lang.String getAnnotationSpecId(int index) { - return annotationSpecId_.get(index); - } - /** - * - * - *
-       * Output only. IDs of the annotation specs used in the confusion matrix.
-       * For Tables CLASSIFICATION
-       * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-       * only list of [annotation_spec_display_name-s][] is populated.
-       * 
- * - * repeated string annotation_spec_id = 1; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) { - return annotationSpecId_.getByteString(index); - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList displayName_; - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @return A list containing the displayName. - */ - public com.google.protobuf.ProtocolStringList getDisplayNameList() { - return displayName_; - } - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @return The count of displayName. - */ - public int getDisplayNameCount() { - return displayName_.size(); - } - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @param index The index of the element to return. - * @return The displayName at the given index. - */ - public java.lang.String getDisplayName(int index) { - return displayName_.get(index); - } - /** - * - * - *
-       * Output only. Display name of the annotation specs used in the confusion
-       * matrix, as they were at the moment of the evaluation. For Tables
-       * CLASSIFICATION
-       * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-       * distinct values of the target column at the moment of the model
-       * evaluation are populated here.
-       * 
- * - * repeated string display_name = 3; - * - * @param index The index of the value to return. - * @return The bytes of the displayName at the given index. - */ - public com.google.protobuf.ByteString getDisplayNameBytes(int index) { - return displayName_.getByteString(index); - } - - public static final int ROW_FIELD_NUMBER = 2; - private java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row> - row_; - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row> - getRowList() { - return row_; - } - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> - getRowOrBuilderList() { - return row_; - } - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public int getRowCount() { - return row_.size(); - } - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - getRow(int index) { - return row_.get(index); - } - /** - * - * - *
-       * Output only. Rows in the confusion matrix. The number of rows is equal to
-       * the size of `annotation_spec_id`.
-       * `row[i].example_count[j]` is the number of examples that have ground
-       * truth of the `annotation_spec_id[i]` and are predicted as
-       * `annotation_spec_id[j]` by the model being evaluated.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.RowOrBuilder - getRowOrBuilder(int index) { - return row_.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 < annotationSpecId_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 1, annotationSpecId_.getRaw(i)); - } - for (int i = 0; i < row_.size(); i++) { - output.writeMessage(2, row_.get(i)); - } - for (int i = 0; i < displayName_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_.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 < annotationSpecId_.size(); i++) { - dataSize += computeStringSizeNoTag(annotationSpecId_.getRaw(i)); - } - size += dataSize; - size += 1 * getAnnotationSpecIdList().size(); - } - for (int i = 0; i < row_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, row_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < displayName_.size(); i++) { - dataSize += computeStringSizeNoTag(displayName_.getRaw(i)); - } - size += dataSize; - size += 1 * getDisplayNameList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - other = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix) - obj; - - if (!getAnnotationSpecIdList().equals(other.getAnnotationSpecIdList())) return false; - if (!getDisplayNameList().equals(other.getDisplayNameList())) return false; - if (!getRowList().equals(other.getRowList())) return false; - if (!unknownFields.equals(other.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 (getAnnotationSpecIdCount() > 0) { - hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getAnnotationSpecIdList().hashCode(); - } - if (getDisplayNameCount() > 0) { - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayNameList().hashCode(); - } - if (getRowCount() > 0) { - hash = (37 * hash) + ROW_FIELD_NUMBER; - hash = (53 * hash) + getRowList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Confusion matrix of the model running the classification.
-       * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix) - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.class, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.ConfusionMatrix.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRowFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - displayName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - if (rowBuilder_ == null) { - row_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - rowBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - build() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - buildPartial() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - result = - new com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - annotationSpecId_ = annotationSpecId_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.annotationSpecId_ = annotationSpecId_; - if (((bitField0_ & 0x00000002) != 0)) { - displayName_ = displayName_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.displayName_ = displayName_; - if (rowBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - row_ = java.util.Collections.unmodifiableList(row_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.row_ = row_; - } else { - result.row_ = rowBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - other) { - if (other - == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance()) return this; - if (!other.annotationSpecId_.isEmpty()) { - if (annotationSpecId_.isEmpty()) { - annotationSpecId_ = other.annotationSpecId_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.addAll(other.annotationSpecId_); - } - onChanged(); - } - if (!other.displayName_.isEmpty()) { - if (displayName_.isEmpty()) { - displayName_ = other.displayName_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDisplayNameIsMutable(); - displayName_.addAll(other.displayName_); - } - onChanged(); - } - if (rowBuilder_ == null) { - if (!other.row_.isEmpty()) { - if (row_.isEmpty()) { - row_ = other.row_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureRowIsMutable(); - row_.addAll(other.row_); - } - onChanged(); - } - } else { - if (!other.row_.isEmpty()) { - if (rowBuilder_.isEmpty()) { - rowBuilder_.dispose(); - rowBuilder_ = null; - row_ = other.row_; - bitField0_ = (bitField0_ & ~0x00000004); - rowBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getRowFieldBuilder() - : null; - } else { - rowBuilder_.addAllMessages(other.row_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList annotationSpecId_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureAnnotationSpecIdIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(annotationSpecId_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @return A list containing the annotationSpecId. - */ - public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() { - return annotationSpecId_.getUnmodifiableView(); - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @return The count of annotationSpecId. - */ - public int getAnnotationSpecIdCount() { - return annotationSpecId_.size(); - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - public java.lang.String getAnnotationSpecId(int index) { - return annotationSpecId_.get(index); - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) { - return annotationSpecId_.getByteString(index); - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @param index The index to set the value at. - * @param value The annotationSpecId to set. - * @return This builder for chaining. - */ - public Builder setAnnotationSpecId(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @param value The annotationSpecId to add. - * @return This builder for chaining. - */ - public Builder addAnnotationSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @param values The annotationSpecId to add. - * @return This builder for chaining. - */ - public Builder addAllAnnotationSpecId(java.lang.Iterable values) { - ensureAnnotationSpecIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecId_); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearAnnotationSpecId() { - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. IDs of the annotation specs used in the confusion matrix.
-         * For Tables CLASSIFICATION
-         * [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-         * only list of [annotation_spec_display_name-s][] is populated.
-         * 
- * - * repeated string annotation_spec_id = 1; - * - * @param value The bytes of the annotationSpecId to add. - * @return This builder for chaining. - */ - public Builder addAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.add(value); - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList displayName_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureDisplayNameIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - displayName_ = new com.google.protobuf.LazyStringArrayList(displayName_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @return A list containing the displayName. - */ - public com.google.protobuf.ProtocolStringList getDisplayNameList() { - return displayName_.getUnmodifiableView(); - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @return The count of displayName. - */ - public int getDisplayNameCount() { - return displayName_.size(); - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @param index The index of the element to return. - * @return The displayName at the given index. - */ - public java.lang.String getDisplayName(int index) { - return displayName_.get(index); - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @param index The index of the value to return. - * @return The bytes of the displayName at the given index. - */ - public com.google.protobuf.ByteString getDisplayNameBytes(int index) { - return displayName_.getByteString(index); - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @param index The index to set the value at. - * @param value The displayName to set. - * @return This builder for chaining. - */ - public Builder setDisplayName(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDisplayNameIsMutable(); - displayName_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @param value The displayName to add. - * @return This builder for chaining. - */ - public Builder addDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDisplayNameIsMutable(); - displayName_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @param values The displayName to add. - * @return This builder for chaining. - */ - public Builder addAllDisplayName(java.lang.Iterable values) { - ensureDisplayNameIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, displayName_); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - displayName_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-         * Output only. Display name of the annotation specs used in the confusion
-         * matrix, as they were at the moment of the evaluation. For Tables
-         * CLASSIFICATION
-         * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type],
-         * distinct values of the target column at the moment of the model
-         * evaluation are populated here.
-         * 
- * - * repeated string display_name = 3; - * - * @param value The bytes of the displayName to add. - * @return This builder for chaining. - */ - public Builder addDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureDisplayNameIsMutable(); - displayName_.add(value); - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row> - row_ = java.util.Collections.emptyList(); - - private void ensureRowIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - row_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row>(row_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.RowOrBuilder> - rowBuilder_; - - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row> - getRowList() { - if (rowBuilder_ == null) { - return java.util.Collections.unmodifiableList(row_); - } else { - return rowBuilder_.getMessageList(); - } - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public int getRowCount() { - if (rowBuilder_ == null) { - return row_.size(); - } else { - return rowBuilder_.getCount(); - } - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - getRow(int index) { - if (rowBuilder_ == null) { - return row_.get(index); - } else { - return rowBuilder_.getMessage(index); - } - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder setRow( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - value) { - if (rowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowIsMutable(); - row_.set(index, value); - onChanged(); - } else { - rowBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder setRow( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder - builderForValue) { - if (rowBuilder_ == null) { - ensureRowIsMutable(); - row_.set(index, builderForValue.build()); - onChanged(); - } else { - rowBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder addRow( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - value) { - if (rowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowIsMutable(); - row_.add(value); - onChanged(); - } else { - rowBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder addRow( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row - value) { - if (rowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRowIsMutable(); - row_.add(index, value); - onChanged(); - } else { - rowBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder addRow( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder - builderForValue) { - if (rowBuilder_ == null) { - ensureRowIsMutable(); - row_.add(builderForValue.build()); - onChanged(); - } else { - rowBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder addRow( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder - builderForValue) { - if (rowBuilder_ == null) { - ensureRowIsMutable(); - row_.add(index, builderForValue.build()); - onChanged(); - } else { - rowBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder addAllRow( - java.lang.Iterable< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row> - values) { - if (rowBuilder_ == null) { - ensureRowIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, row_); - onChanged(); - } else { - rowBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder clearRow() { - if (rowBuilder_ == null) { - row_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - rowBuilder_.clear(); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public Builder removeRow(int index) { - if (rowBuilder_ == null) { - ensureRowIsMutable(); - row_.remove(index); - onChanged(); - } else { - rowBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder - getRowBuilder(int index) { - return getRowFieldBuilder().getBuilder(index); - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.RowOrBuilder - getRowOrBuilder(int index) { - if (rowBuilder_ == null) { - return row_.get(index); - } else { - return rowBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder> - getRowOrBuilderList() { - if (rowBuilder_ != null) { - return rowBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(row_); - } - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder - addRowBuilder() { - return getRowFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance()); - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder - addRowBuilder(int index) { - return getRowFieldBuilder() - .addBuilder( - index, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.getDefaultInstance()); - } - /** - * - * - *
-         * Output only. Rows in the confusion matrix. The number of rows is equal to
-         * the size of `annotation_spec_id`.
-         * `row[i].example_count[j]` is the number of examples that have ground
-         * truth of the `annotation_spec_id[i]` and are predicted as
-         * `annotation_spec_id[j]` by the model being evaluated.
-         * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row row = 2; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder> - getRowBuilderList() { - return getRowFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Row.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.RowOrBuilder> - getRowFieldBuilder() { - if (rowBuilder_ == null) { - rowBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Row.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.RowOrBuilder>( - row_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - row_ = null; - } - return rowBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix) - private static final com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix(); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConfusionMatrix parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfusionMatrix(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int AU_PRC_FIELD_NUMBER = 1; - private float auPrc_; - /** - * - * - *
-     * Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
-     * for the overall evaluation.
-     * 
- * - * float au_prc = 1; - * - * @return The auPrc. - */ - public float getAuPrc() { - return auPrc_; - } - - public static final int BASE_AU_PRC_FIELD_NUMBER = 2; - private float baseAuPrc_; - /** - * - * - *
-     * Output only. The Area Under Precision-Recall Curve metric based on priors.
-     * Micro-averaged for the overall evaluation.
-     * Deprecated.
-     * 
- * - * float base_au_prc = 2 [deprecated = true]; - * - * @return The baseAuPrc. - */ - @java.lang.Deprecated - public float getBaseAuPrc() { - return baseAuPrc_; - } - - public static final int AU_ROC_FIELD_NUMBER = 6; - private float auRoc_; - /** - * - * - *
-     * Output only. The Area Under Receiver Operating Characteristic curve metric.
-     * Micro-averaged for the overall evaluation.
-     * 
- * - * float au_roc = 6; - * - * @return The auRoc. - */ - public float getAuRoc() { - return auRoc_; - } - - public static final int LOG_LOSS_FIELD_NUMBER = 7; - private float logLoss_; - /** - * - * - *
-     * Output only. The Log Loss metric.
-     * 
- * - * float log_loss = 7; - * - * @return The logLoss. - */ - public float getLogLoss() { - return logLoss_; - } - - public static final int CONFIDENCE_METRICS_ENTRY_FIELD_NUMBER = 3; - private java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry> - confidenceMetricsEntry_; - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry> - getConfidenceMetricsEntryList() { - return confidenceMetricsEntry_; - } - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntryOrBuilderList() { - return confidenceMetricsEntry_; - } - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public int getConfidenceMetricsEntryCount() { - return confidenceMetricsEntry_.size(); - } - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - getConfidenceMetricsEntry(int index) { - return confidenceMetricsEntry_.get(index); - } - /** - * - * - *
-     * Output only. Metrics for each confidence_threshold in
-     * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-     * position_threshold = INT32_MAX_VALUE.
-     * ROC and precision-recall curves, and other aggregated metrics are derived
-     * from them. The confidence metrics entries may also be supplied for
-     * additional values of position_threshold, but from these no aggregated
-     * metrics are computed.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntryOrBuilder(int index) { - return confidenceMetricsEntry_.get(index); - } - - public static final int CONFUSION_MATRIX_FIELD_NUMBER = 4; - private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - confusionMatrix_; - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for MULTICLASS classification problems where number
-     * of labels is no more than 10.
-     * Only set for model level evaluation, not for evaluation per label.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - * - * @return Whether the confusionMatrix field is set. - */ - public boolean hasConfusionMatrix() { - return confusionMatrix_ != null; - } - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for MULTICLASS classification problems where number
-     * of labels is no more than 10.
-     * Only set for model level evaluation, not for evaluation per label.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - * - * @return The confusionMatrix. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getConfusionMatrix() { - return confusionMatrix_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance() - : confusionMatrix_; - } - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for MULTICLASS classification problems where number
-     * of labels is no more than 10.
-     * Only set for model level evaluation, not for evaluation per label.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder - getConfusionMatrixOrBuilder() { - return getConfusionMatrix(); - } - - public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList annotationSpecId_; - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @return A list containing the annotationSpecId. - */ - public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() { - return annotationSpecId_; - } - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @return The count of annotationSpecId. - */ - public int getAnnotationSpecIdCount() { - return annotationSpecId_.size(); - } - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - public java.lang.String getAnnotationSpecId(int index) { - return annotationSpecId_.get(index); - } - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * 
- * - * repeated string annotation_spec_id = 5; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) { - return annotationSpecId_.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 (auPrc_ != 0F) { - output.writeFloat(1, auPrc_); - } - if (baseAuPrc_ != 0F) { - output.writeFloat(2, baseAuPrc_); - } - for (int i = 0; i < confidenceMetricsEntry_.size(); i++) { - output.writeMessage(3, confidenceMetricsEntry_.get(i)); - } - if (confusionMatrix_ != null) { - output.writeMessage(4, getConfusionMatrix()); - } - for (int i = 0; i < annotationSpecId_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, annotationSpecId_.getRaw(i)); - } - if (auRoc_ != 0F) { - output.writeFloat(6, auRoc_); - } - if (logLoss_ != 0F) { - output.writeFloat(7, logLoss_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (auPrc_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, auPrc_); - } - if (baseAuPrc_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, baseAuPrc_); - } - for (int i = 0; i < confidenceMetricsEntry_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, confidenceMetricsEntry_.get(i)); - } - if (confusionMatrix_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getConfusionMatrix()); - } - { - int dataSize = 0; - for (int i = 0; i < annotationSpecId_.size(); i++) { - dataSize += computeStringSizeNoTag(annotationSpecId_.getRaw(i)); - } - size += dataSize; - size += 1 * getAnnotationSpecIdList().size(); - } - if (auRoc_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, auRoc_); - } - if (logLoss_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, logLoss_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics other = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) obj; - - if (java.lang.Float.floatToIntBits(getAuPrc()) - != java.lang.Float.floatToIntBits(other.getAuPrc())) return false; - if (java.lang.Float.floatToIntBits(getBaseAuPrc()) - != java.lang.Float.floatToIntBits(other.getBaseAuPrc())) return false; - if (java.lang.Float.floatToIntBits(getAuRoc()) - != java.lang.Float.floatToIntBits(other.getAuRoc())) return false; - if (java.lang.Float.floatToIntBits(getLogLoss()) - != java.lang.Float.floatToIntBits(other.getLogLoss())) return false; - if (!getConfidenceMetricsEntryList().equals(other.getConfidenceMetricsEntryList())) - return false; - if (hasConfusionMatrix() != other.hasConfusionMatrix()) return false; - if (hasConfusionMatrix()) { - if (!getConfusionMatrix().equals(other.getConfusionMatrix())) return false; - } - if (!getAnnotationSpecIdList().equals(other.getAnnotationSpecIdList())) return false; - if (!unknownFields.equals(other.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) + AU_PRC_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getAuPrc()); - hash = (37 * hash) + BASE_AU_PRC_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getBaseAuPrc()); - hash = (37 * hash) + AU_ROC_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getAuRoc()); - hash = (37 * hash) + LOG_LOSS_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getLogLoss()); - if (getConfidenceMetricsEntryCount() > 0) { - hash = (37 * hash) + CONFIDENCE_METRICS_ENTRY_FIELD_NUMBER; - hash = (53 * hash) + getConfidenceMetricsEntryList().hashCode(); - } - if (hasConfusionMatrix()) { - hash = (37 * hash) + CONFUSION_MATRIX_FIELD_NUMBER; - hash = (53 * hash) + getConfusionMatrix().hashCode(); - } - if (getAnnotationSpecIdCount() > 0) { - hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getAnnotationSpecIdList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 evaluation metrics for classification problems.
-     * Note: For Video Classification this metrics only describe quality of the
-     * Video Classification predictions of "segment_classification" type.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ClassificationEvaluationMetrics} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics) - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .class, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConfidenceMetricsEntryFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - auPrc_ = 0F; - - baseAuPrc_ = 0F; - - auRoc_ = 0F; - - logLoss_ = 0F; - - if (confidenceMetricsEntryBuilder_ == null) { - confidenceMetricsEntry_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - confidenceMetricsEntryBuilder_.clear(); - } - if (confusionMatrixBuilder_ == null) { - confusionMatrix_ = null; - } else { - confusionMatrix_ = null; - confusionMatrixBuilder_ = null; - } - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto - .internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - build() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - buildPartial() { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics result = - new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics( - this); - int from_bitField0_ = bitField0_; - result.auPrc_ = auPrc_; - result.baseAuPrc_ = baseAuPrc_; - result.auRoc_ = auRoc_; - result.logLoss_ = logLoss_; - if (confidenceMetricsEntryBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntry_ = - java.util.Collections.unmodifiableList(confidenceMetricsEntry_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.confidenceMetricsEntry_ = confidenceMetricsEntry_; - } else { - result.confidenceMetricsEntry_ = confidenceMetricsEntryBuilder_.build(); - } - if (confusionMatrixBuilder_ == null) { - result.confusionMatrix_ = confusionMatrix_; - } else { - result.confusionMatrix_ = confusionMatrixBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - annotationSpecId_ = annotationSpecId_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.annotationSpecId_ = annotationSpecId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - other) { - if (other - == com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance()) return this; - if (other.getAuPrc() != 0F) { - setAuPrc(other.getAuPrc()); - } - if (other.getBaseAuPrc() != 0F) { - setBaseAuPrc(other.getBaseAuPrc()); - } - if (other.getAuRoc() != 0F) { - setAuRoc(other.getAuRoc()); - } - if (other.getLogLoss() != 0F) { - setLogLoss(other.getLogLoss()); - } - if (confidenceMetricsEntryBuilder_ == null) { - if (!other.confidenceMetricsEntry_.isEmpty()) { - if (confidenceMetricsEntry_.isEmpty()) { - confidenceMetricsEntry_ = other.confidenceMetricsEntry_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.addAll(other.confidenceMetricsEntry_); - } - onChanged(); - } - } else { - if (!other.confidenceMetricsEntry_.isEmpty()) { - if (confidenceMetricsEntryBuilder_.isEmpty()) { - confidenceMetricsEntryBuilder_.dispose(); - confidenceMetricsEntryBuilder_ = null; - confidenceMetricsEntry_ = other.confidenceMetricsEntry_; - bitField0_ = (bitField0_ & ~0x00000001); - confidenceMetricsEntryBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getConfidenceMetricsEntryFieldBuilder() - : null; - } else { - confidenceMetricsEntryBuilder_.addAllMessages(other.confidenceMetricsEntry_); - } - } - } - if (other.hasConfusionMatrix()) { - mergeConfusionMatrix(other.getConfusionMatrix()); - } - if (!other.annotationSpecId_.isEmpty()) { - if (annotationSpecId_.isEmpty()) { - annotationSpecId_ = other.annotationSpecId_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.addAll(other.annotationSpecId_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private float auPrc_; - /** - * - * - *
-       * Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
-       * for the overall evaluation.
-       * 
- * - * float au_prc = 1; - * - * @return The auPrc. - */ - public float getAuPrc() { - return auPrc_; - } - /** - * - * - *
-       * Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
-       * for the overall evaluation.
-       * 
- * - * float au_prc = 1; - * - * @param value The auPrc to set. - * @return This builder for chaining. - */ - public Builder setAuPrc(float value) { - - auPrc_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The Area Under Precision-Recall Curve metric. Micro-averaged
-       * for the overall evaluation.
-       * 
- * - * float au_prc = 1; - * - * @return This builder for chaining. - */ - public Builder clearAuPrc() { - - auPrc_ = 0F; - onChanged(); - return this; - } - - private float baseAuPrc_; - /** - * - * - *
-       * Output only. The Area Under Precision-Recall Curve metric based on priors.
-       * Micro-averaged for the overall evaluation.
-       * Deprecated.
-       * 
- * - * float base_au_prc = 2 [deprecated = true]; - * - * @return The baseAuPrc. - */ - @java.lang.Deprecated - public float getBaseAuPrc() { - return baseAuPrc_; - } - /** - * - * - *
-       * Output only. The Area Under Precision-Recall Curve metric based on priors.
-       * Micro-averaged for the overall evaluation.
-       * Deprecated.
-       * 
- * - * float base_au_prc = 2 [deprecated = true]; - * - * @param value The baseAuPrc to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setBaseAuPrc(float value) { - - baseAuPrc_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The Area Under Precision-Recall Curve metric based on priors.
-       * Micro-averaged for the overall evaluation.
-       * Deprecated.
-       * 
- * - * float base_au_prc = 2 [deprecated = true]; - * - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearBaseAuPrc() { - - baseAuPrc_ = 0F; - onChanged(); - return this; - } - - private float auRoc_; - /** - * - * - *
-       * Output only. The Area Under Receiver Operating Characteristic curve metric.
-       * Micro-averaged for the overall evaluation.
-       * 
- * - * float au_roc = 6; - * - * @return The auRoc. - */ - public float getAuRoc() { - return auRoc_; - } - /** - * - * - *
-       * Output only. The Area Under Receiver Operating Characteristic curve metric.
-       * Micro-averaged for the overall evaluation.
-       * 
- * - * float au_roc = 6; - * - * @param value The auRoc to set. - * @return This builder for chaining. - */ - public Builder setAuRoc(float value) { - - auRoc_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The Area Under Receiver Operating Characteristic curve metric.
-       * Micro-averaged for the overall evaluation.
-       * 
- * - * float au_roc = 6; - * - * @return This builder for chaining. - */ - public Builder clearAuRoc() { - - auRoc_ = 0F; - onChanged(); - return this; - } - - private float logLoss_; - /** - * - * - *
-       * Output only. The Log Loss metric.
-       * 
- * - * float log_loss = 7; - * - * @return The logLoss. - */ - public float getLogLoss() { - return logLoss_; - } - /** - * - * - *
-       * Output only. The Log Loss metric.
-       * 
- * - * float log_loss = 7; - * - * @param value The logLoss to set. - * @return This builder for chaining. - */ - public Builder setLogLoss(float value) { - - logLoss_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The Log Loss metric.
-       * 
- * - * float log_loss = 7; - * - * @return This builder for chaining. - */ - public Builder clearLogLoss() { - - logLoss_ = 0F; - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry> - confidenceMetricsEntry_ = java.util.Collections.emptyList(); - - private void ensureConfidenceMetricsEntryIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntry_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry>( - confidenceMetricsEntry_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - confidenceMetricsEntryBuilder_; - - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry> - getConfidenceMetricsEntryList() { - if (confidenceMetricsEntryBuilder_ == null) { - return java.util.Collections.unmodifiableList(confidenceMetricsEntry_); - } else { - return confidenceMetricsEntryBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public int getConfidenceMetricsEntryCount() { - if (confidenceMetricsEntryBuilder_ == null) { - return confidenceMetricsEntry_.size(); - } else { - return confidenceMetricsEntryBuilder_.getCount(); - } - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - getConfidenceMetricsEntry(int index) { - if (confidenceMetricsEntryBuilder_ == null) { - return confidenceMetricsEntry_.get(index); - } else { - return confidenceMetricsEntryBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder setConfidenceMetricsEntry( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - value) { - if (confidenceMetricsEntryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.set(index, value); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder setConfidenceMetricsEntry( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder - builderForValue) { - if (confidenceMetricsEntryBuilder_ == null) { - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.set(index, builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder addConfidenceMetricsEntry( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - value) { - if (confidenceMetricsEntryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.add(value); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder addConfidenceMetricsEntry( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry - value) { - if (confidenceMetricsEntryBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.add(index, value); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder addConfidenceMetricsEntry( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder - builderForValue) { - if (confidenceMetricsEntryBuilder_ == null) { - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.add(builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder addConfidenceMetricsEntry( - int index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder - builderForValue) { - if (confidenceMetricsEntryBuilder_ == null) { - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.add(index, builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder addAllConfidenceMetricsEntry( - java.lang.Iterable< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry> - values) { - if (confidenceMetricsEntryBuilder_ == null) { - ensureConfidenceMetricsEntryIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidenceMetricsEntry_); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder clearConfidenceMetricsEntry() { - if (confidenceMetricsEntryBuilder_ == null) { - confidenceMetricsEntry_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public Builder removeConfidenceMetricsEntry(int index) { - if (confidenceMetricsEntryBuilder_ == null) { - ensureConfidenceMetricsEntryIsMutable(); - confidenceMetricsEntry_.remove(index); - onChanged(); - } else { - confidenceMetricsEntryBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder - getConfidenceMetricsEntryBuilder(int index) { - return getConfidenceMetricsEntryFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntryOrBuilder(int index) { - if (confidenceMetricsEntryBuilder_ == null) { - return confidenceMetricsEntry_.get(index); - } else { - return confidenceMetricsEntryBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntryOrBuilderList() { - if (confidenceMetricsEntryBuilder_ != null) { - return confidenceMetricsEntryBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(confidenceMetricsEntry_); - } - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder - addConfidenceMetricsEntryBuilder() { - return getConfidenceMetricsEntryFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.getDefaultInstance()); - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder - addConfidenceMetricsEntryBuilder(int index) { - return getConfidenceMetricsEntryFieldBuilder() - .addBuilder( - index, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.getDefaultInstance()); - } - /** - * - * - *
-       * Output only. Metrics for each confidence_threshold in
-       * 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and
-       * position_threshold = INT32_MAX_VALUE.
-       * ROC and precision-recall curves, and other aggregated metrics are derived
-       * from them. The confidence metrics entries may also be supplied for
-       * additional values of position_threshold, but from these no aggregated
-       * metrics are computed.
-       * 
- * - * - * repeated .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entry = 3; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder> - getConfidenceMetricsEntryBuilderList() { - return getConfidenceMetricsEntryFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntryFieldBuilder() { - if (confidenceMetricsEntryBuilder_ == null) { - confidenceMetricsEntryBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfidenceMetricsEntryOrBuilder>( - confidenceMetricsEntry_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - confidenceMetricsEntry_ = null; - } - return confidenceMetricsEntryBuilder_; - } - - private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - confusionMatrix_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder> - confusionMatrixBuilder_; - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - * - * @return Whether the confusionMatrix field is set. - */ - public boolean hasConfusionMatrix() { - return confusionMatrixBuilder_ != null || confusionMatrix_ != null; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - * - * @return The confusionMatrix. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getConfusionMatrix() { - if (confusionMatrixBuilder_ == null) { - return confusionMatrix_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance() - : confusionMatrix_; - } else { - return confusionMatrixBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - public Builder setConfusionMatrix( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - value) { - if (confusionMatrixBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - confusionMatrix_ = value; - onChanged(); - } else { - confusionMatrixBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - public Builder setConfusionMatrix( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder - builderForValue) { - if (confusionMatrixBuilder_ == null) { - confusionMatrix_ = builderForValue.build(); - onChanged(); - } else { - confusionMatrixBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - public Builder mergeConfusionMatrix( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - value) { - if (confusionMatrixBuilder_ == null) { - if (confusionMatrix_ != null) { - confusionMatrix_ = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.newBuilder(confusionMatrix_) - .mergeFrom(value) - .buildPartial(); - } else { - confusionMatrix_ = value; - } - onChanged(); - } else { - confusionMatrixBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - public Builder clearConfusionMatrix() { - if (confusionMatrixBuilder_ == null) { - confusionMatrix_ = null; - onChanged(); - } else { - confusionMatrix_ = null; - confusionMatrixBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder - getConfusionMatrixBuilder() { - - onChanged(); - return getConfusionMatrixFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder - getConfusionMatrixOrBuilder() { - if (confusionMatrixBuilder_ != null) { - return confusionMatrixBuilder_.getMessageOrBuilder(); - } else { - return confusionMatrix_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance() - : confusionMatrix_; - } - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for MULTICLASS classification problems where number
-       * of labels is no more than 10.
-       * Only set for model level evaluation, not for evaluation per label.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 4; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder> - getConfusionMatrixFieldBuilder() { - if (confusionMatrixBuilder_ == null) { - confusionMatrixBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder>( - getConfusionMatrix(), getParentForChildren(), isClean()); - confusionMatrix_ = null; - } - return confusionMatrixBuilder_; - } - - private com.google.protobuf.LazyStringList annotationSpecId_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureAnnotationSpecIdIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(annotationSpecId_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @return A list containing the annotationSpecId. - */ - public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() { - return annotationSpecId_.getUnmodifiableView(); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @return The count of annotationSpecId. - */ - public int getAnnotationSpecIdCount() { - return annotationSpecId_.size(); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - public java.lang.String getAnnotationSpecId(int index) { - return annotationSpecId_.get(index); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) { - return annotationSpecId_.getByteString(index); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @param index The index to set the value at. - * @param value The annotationSpecId to set. - * @return This builder for chaining. - */ - public Builder setAnnotationSpecId(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @param value The annotationSpecId to add. - * @return This builder for chaining. - */ - public Builder addAnnotationSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @param values The annotationSpecId to add. - * @return This builder for chaining. - */ - public Builder addAllAnnotationSpecId(java.lang.Iterable values) { - ensureAnnotationSpecIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecId_); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @return This builder for chaining. - */ - public Builder clearAnnotationSpecId() { - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * 
- * - * repeated string annotation_spec_id = 5; - * - * @param value The bytes of the annotationSpecId to add. - * @return This builder for chaining. - */ - public Builder addAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ClassificationEvaluationMetrics) - private static final com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics(); - } - - public static com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ClassificationEvaluationMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ClassificationEvaluationMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_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/automl/v1beta1/classifica" - + "tion.proto\022\033google.cloud.automl.v1beta1\032" - + "*google/cloud/automl/v1beta1/temporal.pr" - + "oto\032\034google/api/annotations.proto\")\n\030Cla" - + "ssificationAnnotation\022\r\n\005score\030\001 \001(\002\"\307\001\n" - + "\035VideoClassificationAnnotation\022\014\n\004type\030\001" - + " \001(\t\022X\n\031classification_annotation\030\002 \001(\0132" - + "5.google.cloud.automl.v1beta1.Classifica" - + "tionAnnotation\022>\n\014time_segment\030\003 \001(\0132(.g" - + "oogle.cloud.automl.v1beta1.TimeSegment\"\251" - + "\007\n\037ClassificationEvaluationMetrics\022\016\n\006au" - + "_prc\030\001 \001(\002\022\027\n\013base_au_prc\030\002 \001(\002B\002\030\001\022\016\n\006a" - + "u_roc\030\006 \001(\002\022\020\n\010log_loss\030\007 \001(\002\022u\n\030confide" - + "nce_metrics_entry\030\003 \003(\0132S.google.cloud.a" - + "utoml.v1beta1.ClassificationEvaluationMe" - + "trics.ConfidenceMetricsEntry\022f\n\020confusio" - + "n_matrix\030\004 \001(\0132L.google.cloud.automl.v1b" - + "eta1.ClassificationEvaluationMetrics.Con" - + "fusionMatrix\022\032\n\022annotation_spec_id\030\005 \003(\t" - + "\032\374\002\n\026ConfidenceMetricsEntry\022\034\n\024confidenc" - + "e_threshold\030\001 \001(\002\022\032\n\022position_threshold\030" - + "\016 \001(\005\022\016\n\006recall\030\002 \001(\002\022\021\n\tprecision\030\003 \001(\002" - + "\022\033\n\023false_positive_rate\030\010 \001(\002\022\020\n\010f1_scor" - + "e\030\004 \001(\002\022\022\n\nrecall_at1\030\005 \001(\002\022\025\n\rprecision" - + "_at1\030\006 \001(\002\022\037\n\027false_positive_rate_at1\030\t " - + "\001(\002\022\024\n\014f1_score_at1\030\007 \001(\002\022\033\n\023true_positi" - + "ve_count\030\n \001(\003\022\034\n\024false_positive_count\030\013" - + " \001(\003\022\034\n\024false_negative_count\030\014 \001(\003\022\033\n\023tr" - + "ue_negative_count\030\r \001(\003\032\300\001\n\017ConfusionMat" - + "rix\022\032\n\022annotation_spec_id\030\001 \003(\t\022\024\n\014displ" - + "ay_name\030\003 \003(\t\022]\n\003row\030\002 \003(\0132P.google.clou" - + "d.automl.v1beta1.ClassificationEvaluatio" - + "nMetrics.ConfusionMatrix.Row\032\034\n\003Row\022\025\n\re" - + "xample_count\030\001 \003(\005*Y\n\022ClassificationType" - + "\022#\n\037CLASSIFICATION_TYPE_UNSPECIFIED\020\000\022\016\n" - + "\nMULTICLASS\020\001\022\016\n\nMULTILABEL\020\002B\270\001\n\037com.go" - + "ogle.cloud.automl.v1beta1B\023Classificatio" - + "nProtoZAgoogle.golang.org/genproto/googl" - + "eapis/cloud/automl/v1beta1;automl\312\002\033Goog" - + "le\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Cloud:" - + ":AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.Temporal.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ClassificationAnnotation_descriptor, - new java.lang.String[] { - "Score", - }); - internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_VideoClassificationAnnotation_descriptor, - new java.lang.String[] { - "Type", "ClassificationAnnotation", "TimeSegment", - }); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor, - new java.lang.String[] { - "AuPrc", - "BaseAuPrc", - "AuRoc", - "LogLoss", - "ConfidenceMetricsEntry", - "ConfusionMatrix", - "AnnotationSpecId", - }); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfidenceMetricsEntry_descriptor, - new java.lang.String[] { - "ConfidenceThreshold", - "PositionThreshold", - "Recall", - "Precision", - "FalsePositiveRate", - "F1Score", - "RecallAt1", - "PrecisionAt1", - "FalsePositiveRateAt1", - "F1ScoreAt1", - "TruePositiveCount", - "FalsePositiveCount", - "FalseNegativeCount", - "TrueNegativeCount", - }); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor = - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor, - new java.lang.String[] { - "AnnotationSpecId", "DisplayName", "Row", - }); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor = - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ClassificationEvaluationMetrics_ConfusionMatrix_Row_descriptor, - new java.lang.String[] { - "ExampleCount", - }); - com.google.cloud.automl.v1beta1.Temporal.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpec.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpec.java deleted file mode 100644 index 32f9260d9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpec.java +++ /dev/null @@ -1,3161 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/column_spec.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were
- * given on import .
- * Used by:
- *   *   Tables
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ColumnSpec} - */ -public final class ColumnSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ColumnSpec) - ColumnSpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use ColumnSpec.newBuilder() to construct. - private ColumnSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ColumnSpec() { - name_ = ""; - displayName_ = ""; - topCorrelatedColumns_ = java.util.Collections.emptyList(); - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ColumnSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ColumnSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.DataType.Builder subBuilder = null; - if (dataType_ != null) { - subBuilder = dataType_.toBuilder(); - } - dataType_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DataType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataType_); - dataType_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.DataStats.Builder subBuilder = null; - if (dataStats_ != null) { - subBuilder = dataStats_.toBuilder(); - } - dataStats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DataStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataStats_); - dataStats_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topCorrelatedColumns_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn>(); - mutable_bitField0_ |= 0x00000001; - } - topCorrelatedColumns_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.parser(), - extensionRegistry)); - break; - } - case 50: - { - 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topCorrelatedColumns_ = java.util.Collections.unmodifiableList(topCorrelatedColumns_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ColumnSpec.class, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder.class); - } - - public interface CorrelatedColumnOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The column_spec_id of the correlated column, which belongs to the same
-     * table as the in-context column.
-     * 
- * - * string column_spec_id = 1; - * - * @return The columnSpecId. - */ - java.lang.String getColumnSpecId(); - /** - * - * - *
-     * The column_spec_id of the correlated column, which belongs to the same
-     * table as the in-context column.
-     * 
- * - * string column_spec_id = 1; - * - * @return The bytes for columnSpecId. - */ - com.google.protobuf.ByteString getColumnSpecIdBytes(); - - /** - * - * - *
-     * Correlation between this and the in-context column.
-     * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - * - * @return Whether the correlationStats field is set. - */ - boolean hasCorrelationStats(); - /** - * - * - *
-     * Correlation between this and the in-context column.
-     * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - * - * @return The correlationStats. - */ - com.google.cloud.automl.v1beta1.CorrelationStats getCorrelationStats(); - /** - * - * - *
-     * Correlation between this and the in-context column.
-     * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - com.google.cloud.automl.v1beta1.CorrelationStatsOrBuilder getCorrelationStatsOrBuilder(); - } - /** - * - * - *
-   * Identifies the table's column, and its correlation with the column this
-   * ColumnSpec describes.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} - */ - public static final class CorrelatedColumn extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) - CorrelatedColumnOrBuilder { - private static final long serialVersionUID = 0L; - // Use CorrelatedColumn.newBuilder() to construct. - private CorrelatedColumn(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CorrelatedColumn() { - columnSpecId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CorrelatedColumn(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CorrelatedColumn( - 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(); - - columnSpecId_ = s; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.CorrelationStats.Builder subBuilder = null; - if (correlationStats_ != null) { - subBuilder = correlationStats_.toBuilder(); - } - correlationStats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.CorrelationStats.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(correlationStats_); - correlationStats_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.class, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder.class); - } - - public static final int COLUMN_SPEC_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object columnSpecId_; - /** - * - * - *
-     * The column_spec_id of the correlated column, which belongs to the same
-     * table as the in-context column.
-     * 
- * - * string column_spec_id = 1; - * - * @return The columnSpecId. - */ - public java.lang.String getColumnSpecId() { - java.lang.Object ref = columnSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - columnSpecId_ = s; - return s; - } - } - /** - * - * - *
-     * The column_spec_id of the correlated column, which belongs to the same
-     * table as the in-context column.
-     * 
- * - * string column_spec_id = 1; - * - * @return The bytes for columnSpecId. - */ - public com.google.protobuf.ByteString getColumnSpecIdBytes() { - java.lang.Object ref = columnSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - columnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CORRELATION_STATS_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.CorrelationStats correlationStats_; - /** - * - * - *
-     * Correlation between this and the in-context column.
-     * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - * - * @return Whether the correlationStats field is set. - */ - public boolean hasCorrelationStats() { - return correlationStats_ != null; - } - /** - * - * - *
-     * Correlation between this and the in-context column.
-     * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - * - * @return The correlationStats. - */ - public com.google.cloud.automl.v1beta1.CorrelationStats getCorrelationStats() { - return correlationStats_ == null - ? com.google.cloud.automl.v1beta1.CorrelationStats.getDefaultInstance() - : correlationStats_; - } - /** - * - * - *
-     * Correlation between this and the in-context column.
-     * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - public com.google.cloud.automl.v1beta1.CorrelationStatsOrBuilder - getCorrelationStatsOrBuilder() { - return getCorrelationStats(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getColumnSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnSpecId_); - } - if (correlationStats_ != null) { - output.writeMessage(2, getCorrelationStats()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getColumnSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnSpecId_); - } - if (correlationStats_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCorrelationStats()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn other = - (com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) obj; - - if (!getColumnSpecId().equals(other.getColumnSpecId())) return false; - if (hasCorrelationStats() != other.hasCorrelationStats()) return false; - if (hasCorrelationStats()) { - if (!getCorrelationStats().equals(other.getCorrelationStats())) return false; - } - if (!unknownFields.equals(other.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_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getColumnSpecId().hashCode(); - if (hasCorrelationStats()) { - hash = (37 * hash) + CORRELATION_STATS_FIELD_NUMBER; - hash = (53 * hash) + getCorrelationStats().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 the table's column, and its correlation with the column this
-     * ColumnSpec describes.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.class, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - columnSpecId_ = ""; - - if (correlationStatsBuilder_ == null) { - correlationStats_ = null; - } else { - correlationStats_ = null; - correlationStatsBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn build() { - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn buildPartial() { - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn result = - new com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn(this); - result.columnSpecId_ = columnSpecId_; - if (correlationStatsBuilder_ == null) { - result.correlationStats_ = correlationStats_; - } else { - result.correlationStats_ = correlationStatsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) { - return mergeFrom((com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn other) { - if (other - == com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.getDefaultInstance()) - return this; - if (!other.getColumnSpecId().isEmpty()) { - columnSpecId_ = other.columnSpecId_; - onChanged(); - } - if (other.hasCorrelationStats()) { - mergeCorrelationStats(other.getCorrelationStats()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object columnSpecId_ = ""; - /** - * - * - *
-       * The column_spec_id of the correlated column, which belongs to the same
-       * table as the in-context column.
-       * 
- * - * string column_spec_id = 1; - * - * @return The columnSpecId. - */ - public java.lang.String getColumnSpecId() { - java.lang.Object ref = columnSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - columnSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The column_spec_id of the correlated column, which belongs to the same
-       * table as the in-context column.
-       * 
- * - * string column_spec_id = 1; - * - * @return The bytes for columnSpecId. - */ - public com.google.protobuf.ByteString getColumnSpecIdBytes() { - java.lang.Object ref = columnSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - columnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The column_spec_id of the correlated column, which belongs to the same
-       * table as the in-context column.
-       * 
- * - * string column_spec_id = 1; - * - * @param value The columnSpecId to set. - * @return This builder for chaining. - */ - public Builder setColumnSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - columnSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The column_spec_id of the correlated column, which belongs to the same
-       * table as the in-context column.
-       * 
- * - * string column_spec_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearColumnSpecId() { - - columnSpecId_ = getDefaultInstance().getColumnSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-       * The column_spec_id of the correlated column, which belongs to the same
-       * table as the in-context column.
-       * 
- * - * string column_spec_id = 1; - * - * @param value The bytes for columnSpecId to set. - * @return This builder for chaining. - */ - public Builder setColumnSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - columnSpecId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.automl.v1beta1.CorrelationStats correlationStats_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CorrelationStats, - com.google.cloud.automl.v1beta1.CorrelationStats.Builder, - com.google.cloud.automl.v1beta1.CorrelationStatsOrBuilder> - correlationStatsBuilder_; - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - * - * @return Whether the correlationStats field is set. - */ - public boolean hasCorrelationStats() { - return correlationStatsBuilder_ != null || correlationStats_ != null; - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - * - * @return The correlationStats. - */ - public com.google.cloud.automl.v1beta1.CorrelationStats getCorrelationStats() { - if (correlationStatsBuilder_ == null) { - return correlationStats_ == null - ? com.google.cloud.automl.v1beta1.CorrelationStats.getDefaultInstance() - : correlationStats_; - } else { - return correlationStatsBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - public Builder setCorrelationStats(com.google.cloud.automl.v1beta1.CorrelationStats value) { - if (correlationStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - correlationStats_ = value; - onChanged(); - } else { - correlationStatsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - public Builder setCorrelationStats( - com.google.cloud.automl.v1beta1.CorrelationStats.Builder builderForValue) { - if (correlationStatsBuilder_ == null) { - correlationStats_ = builderForValue.build(); - onChanged(); - } else { - correlationStatsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - public Builder mergeCorrelationStats(com.google.cloud.automl.v1beta1.CorrelationStats value) { - if (correlationStatsBuilder_ == null) { - if (correlationStats_ != null) { - correlationStats_ = - com.google.cloud.automl.v1beta1.CorrelationStats.newBuilder(correlationStats_) - .mergeFrom(value) - .buildPartial(); - } else { - correlationStats_ = value; - } - onChanged(); - } else { - correlationStatsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - public Builder clearCorrelationStats() { - if (correlationStatsBuilder_ == null) { - correlationStats_ = null; - onChanged(); - } else { - correlationStats_ = null; - correlationStatsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - public com.google.cloud.automl.v1beta1.CorrelationStats.Builder getCorrelationStatsBuilder() { - - onChanged(); - return getCorrelationStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - public com.google.cloud.automl.v1beta1.CorrelationStatsOrBuilder - getCorrelationStatsOrBuilder() { - if (correlationStatsBuilder_ != null) { - return correlationStatsBuilder_.getMessageOrBuilder(); - } else { - return correlationStats_ == null - ? com.google.cloud.automl.v1beta1.CorrelationStats.getDefaultInstance() - : correlationStats_; - } - } - /** - * - * - *
-       * Correlation between this and the in-context column.
-       * 
- * - * .google.cloud.automl.v1beta1.CorrelationStats correlation_stats = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CorrelationStats, - com.google.cloud.automl.v1beta1.CorrelationStats.Builder, - com.google.cloud.automl.v1beta1.CorrelationStatsOrBuilder> - getCorrelationStatsFieldBuilder() { - if (correlationStatsBuilder_ == null) { - correlationStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CorrelationStats, - com.google.cloud.automl.v1beta1.CorrelationStats.Builder, - com.google.cloud.automl.v1beta1.CorrelationStatsOrBuilder>( - getCorrelationStats(), getParentForChildren(), isClean()); - correlationStats_ = null; - } - return correlationStatsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn) - private static final com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn(); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CorrelatedColumn parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CorrelatedColumn(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn 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 column specs.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - 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 column specs.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - 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 DATA_TYPE_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.DataType dataType_; - /** - * - * - *
-   * The data type of elements stored in the column.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - * - * @return Whether the dataType field is set. - */ - public boolean hasDataType() { - return dataType_ != null; - } - /** - * - * - *
-   * The data type of elements stored in the column.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - * - * @return The dataType. - */ - public com.google.cloud.automl.v1beta1.DataType getDataType() { - return dataType_ == null - ? com.google.cloud.automl.v1beta1.DataType.getDefaultInstance() - : dataType_; - } - /** - * - * - *
-   * The data type of elements stored in the column.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - public com.google.cloud.automl.v1beta1.DataTypeOrBuilder getDataTypeOrBuilder() { - return getDataType(); - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Output only. The name of the column to show in the interface. The name can
-   * be up to 100 characters long and can consist only of ASCII Latin letters
-   * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-   * must start with a letter or a digit.
-   * 
- * - * string display_name = 3; - * - * @return The displayName. - */ - 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; - } - } - /** - * - * - *
-   * Output only. The name of the column to show in the interface. The name can
-   * be up to 100 characters long and can consist only of ASCII Latin letters
-   * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-   * must start with a letter or a digit.
-   * 
- * - * string display_name = 3; - * - * @return The bytes for displayName. - */ - 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 DATA_STATS_FIELD_NUMBER = 4; - private com.google.cloud.automl.v1beta1.DataStats dataStats_; - /** - * - * - *
-   * Output only. Stats of the series of values in the column.
-   * This field may be stale, see the ancestor's
-   * Dataset.tables_dataset_metadata.stats_update_time field
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - * - * @return Whether the dataStats field is set. - */ - public boolean hasDataStats() { - return dataStats_ != null; - } - /** - * - * - *
-   * Output only. Stats of the series of values in the column.
-   * This field may be stale, see the ancestor's
-   * Dataset.tables_dataset_metadata.stats_update_time field
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - * - * @return The dataStats. - */ - public com.google.cloud.automl.v1beta1.DataStats getDataStats() { - return dataStats_ == null - ? com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance() - : dataStats_; - } - /** - * - * - *
-   * Output only. Stats of the series of values in the column.
-   * This field may be stale, see the ancestor's
-   * Dataset.tables_dataset_metadata.stats_update_time field
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - public com.google.cloud.automl.v1beta1.DataStatsOrBuilder getDataStatsOrBuilder() { - return getDataStats(); - } - - public static final int TOP_CORRELATED_COLUMNS_FIELD_NUMBER = 5; - private java.util.List - topCorrelatedColumns_; - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public java.util.List - getTopCorrelatedColumnsList() { - return topCorrelatedColumns_; - } - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder> - getTopCorrelatedColumnsOrBuilderList() { - return topCorrelatedColumns_; - } - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public int getTopCorrelatedColumnsCount() { - return topCorrelatedColumns_.size(); - } - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn getTopCorrelatedColumns( - int index) { - return topCorrelatedColumns_.get(index); - } - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder - getTopCorrelatedColumnsOrBuilder(int index) { - return topCorrelatedColumns_.get(index); - } - - 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. - */ - 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. - */ - 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 (dataType_ != null) { - output.writeMessage(2, getDataType()); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); - } - if (dataStats_ != null) { - output.writeMessage(4, getDataStats()); - } - for (int i = 0; i < topCorrelatedColumns_.size(); i++) { - output.writeMessage(5, topCorrelatedColumns_.get(i)); - } - if (!getEtagBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, 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 (dataType_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataType()); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); - } - if (dataStats_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDataStats()); - } - for (int i = 0; i < topCorrelatedColumns_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(5, topCorrelatedColumns_.get(i)); - } - if (!getEtagBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, 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.automl.v1beta1.ColumnSpec)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ColumnSpec other = - (com.google.cloud.automl.v1beta1.ColumnSpec) obj; - - if (!getName().equals(other.getName())) return false; - if (hasDataType() != other.hasDataType()) return false; - if (hasDataType()) { - if (!getDataType().equals(other.getDataType())) return false; - } - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (hasDataStats() != other.hasDataStats()) return false; - if (hasDataStats()) { - if (!getDataStats().equals(other.getDataStats())) return false; - } - if (!getTopCorrelatedColumnsList().equals(other.getTopCorrelatedColumnsList())) 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 (hasDataType()) { - hash = (37 * hash) + DATA_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getDataType().hashCode(); - } - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - if (hasDataStats()) { - hash = (37 * hash) + DATA_STATS_FIELD_NUMBER; - hash = (53 * hash) + getDataStats().hashCode(); - } - if (getTopCorrelatedColumnsCount() > 0) { - hash = (37 * hash) + TOP_CORRELATED_COLUMNS_FIELD_NUMBER; - hash = (53 * hash) + getTopCorrelatedColumnsList().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.automl.v1beta1.ColumnSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ColumnSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were
-   * given on import .
-   * Used by:
-   *   *   Tables
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ColumnSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ColumnSpec) - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ColumnSpec.class, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ColumnSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopCorrelatedColumnsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (dataTypeBuilder_ == null) { - dataType_ = null; - } else { - dataType_ = null; - dataTypeBuilder_ = null; - } - displayName_ = ""; - - if (dataStatsBuilder_ == null) { - dataStats_ = null; - } else { - dataStats_ = null; - dataStatsBuilder_ = null; - } - if (topCorrelatedColumnsBuilder_ == null) { - topCorrelatedColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topCorrelatedColumnsBuilder_.clear(); - } - etag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ColumnSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_ColumnSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec build() { - com.google.cloud.automl.v1beta1.ColumnSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec buildPartial() { - com.google.cloud.automl.v1beta1.ColumnSpec result = - new com.google.cloud.automl.v1beta1.ColumnSpec(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (dataTypeBuilder_ == null) { - result.dataType_ = dataType_; - } else { - result.dataType_ = dataTypeBuilder_.build(); - } - result.displayName_ = displayName_; - if (dataStatsBuilder_ == null) { - result.dataStats_ = dataStats_; - } else { - result.dataStats_ = dataStatsBuilder_.build(); - } - if (topCorrelatedColumnsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topCorrelatedColumns_ = java.util.Collections.unmodifiableList(topCorrelatedColumns_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topCorrelatedColumns_ = topCorrelatedColumns_; - } else { - result.topCorrelatedColumns_ = topCorrelatedColumnsBuilder_.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.automl.v1beta1.ColumnSpec) { - return mergeFrom((com.google.cloud.automl.v1beta1.ColumnSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ColumnSpec other) { - if (other == com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasDataType()) { - mergeDataType(other.getDataType()); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (other.hasDataStats()) { - mergeDataStats(other.getDataStats()); - } - if (topCorrelatedColumnsBuilder_ == null) { - if (!other.topCorrelatedColumns_.isEmpty()) { - if (topCorrelatedColumns_.isEmpty()) { - topCorrelatedColumns_ = other.topCorrelatedColumns_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.addAll(other.topCorrelatedColumns_); - } - onChanged(); - } - } else { - if (!other.topCorrelatedColumns_.isEmpty()) { - if (topCorrelatedColumnsBuilder_.isEmpty()) { - topCorrelatedColumnsBuilder_.dispose(); - topCorrelatedColumnsBuilder_ = null; - topCorrelatedColumns_ = other.topCorrelatedColumns_; - bitField0_ = (bitField0_ & ~0x00000001); - topCorrelatedColumnsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTopCorrelatedColumnsFieldBuilder() - : null; - } else { - topCorrelatedColumnsBuilder_.addAllMessages(other.topCorrelatedColumns_); - } - } - } - 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.automl.v1beta1.ColumnSpec parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.ColumnSpec) 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 column specs.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. The resource name of the column specs.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. The resource name of the column specs.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-     * 
- * - * 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; - } - /** - * - * - *
-     * Output only. The resource name of the column specs.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the column specs.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-     * 
- * - * 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 com.google.cloud.automl.v1beta1.DataType dataType_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataType, - com.google.cloud.automl.v1beta1.DataType.Builder, - com.google.cloud.automl.v1beta1.DataTypeOrBuilder> - dataTypeBuilder_; - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - * - * @return Whether the dataType field is set. - */ - public boolean hasDataType() { - return dataTypeBuilder_ != null || dataType_ != null; - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - * - * @return The dataType. - */ - public com.google.cloud.automl.v1beta1.DataType getDataType() { - if (dataTypeBuilder_ == null) { - return dataType_ == null - ? com.google.cloud.automl.v1beta1.DataType.getDefaultInstance() - : dataType_; - } else { - return dataTypeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - public Builder setDataType(com.google.cloud.automl.v1beta1.DataType value) { - if (dataTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataType_ = value; - onChanged(); - } else { - dataTypeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - public Builder setDataType(com.google.cloud.automl.v1beta1.DataType.Builder builderForValue) { - if (dataTypeBuilder_ == null) { - dataType_ = builderForValue.build(); - onChanged(); - } else { - dataTypeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - public Builder mergeDataType(com.google.cloud.automl.v1beta1.DataType value) { - if (dataTypeBuilder_ == null) { - if (dataType_ != null) { - dataType_ = - com.google.cloud.automl.v1beta1.DataType.newBuilder(dataType_) - .mergeFrom(value) - .buildPartial(); - } else { - dataType_ = value; - } - onChanged(); - } else { - dataTypeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - public Builder clearDataType() { - if (dataTypeBuilder_ == null) { - dataType_ = null; - onChanged(); - } else { - dataType_ = null; - dataTypeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - public com.google.cloud.automl.v1beta1.DataType.Builder getDataTypeBuilder() { - - onChanged(); - return getDataTypeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - public com.google.cloud.automl.v1beta1.DataTypeOrBuilder getDataTypeOrBuilder() { - if (dataTypeBuilder_ != null) { - return dataTypeBuilder_.getMessageOrBuilder(); - } else { - return dataType_ == null - ? com.google.cloud.automl.v1beta1.DataType.getDefaultInstance() - : dataType_; - } - } - /** - * - * - *
-     * The data type of elements stored in the column.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataType, - com.google.cloud.automl.v1beta1.DataType.Builder, - com.google.cloud.automl.v1beta1.DataTypeOrBuilder> - getDataTypeFieldBuilder() { - if (dataTypeBuilder_ == null) { - dataTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataType, - com.google.cloud.automl.v1beta1.DataType.Builder, - com.google.cloud.automl.v1beta1.DataTypeOrBuilder>( - getDataType(), getParentForChildren(), isClean()); - dataType_ = null; - } - return dataTypeBuilder_; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * Output only. The name of the column to show in the interface. The name can
-     * be up to 100 characters long and can consist only of ASCII Latin letters
-     * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-     * must start with a letter or a digit.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. The name of the column to show in the interface. The name can
-     * be up to 100 characters long and can consist only of ASCII Latin letters
-     * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-     * must start with a letter or a digit.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. The name of the column to show in the interface. The name can
-     * be up to 100 characters long and can consist only of ASCII Latin letters
-     * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-     * must start with a letter or a digit.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Output only. The name of the column to show in the interface. The name can
-     * be up to 100 characters long and can consist only of ASCII Latin letters
-     * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-     * must start with a letter or a digit.
-     * 
- * - * string display_name = 3; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the column to show in the interface. The name can
-     * be up to 100 characters long and can consist only of ASCII Latin letters
-     * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-     * must start with a letter or a digit.
-     * 
- * - * 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.cloud.automl.v1beta1.DataStats dataStats_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataStats, - com.google.cloud.automl.v1beta1.DataStats.Builder, - com.google.cloud.automl.v1beta1.DataStatsOrBuilder> - dataStatsBuilder_; - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - * - * @return Whether the dataStats field is set. - */ - public boolean hasDataStats() { - return dataStatsBuilder_ != null || dataStats_ != null; - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - * - * @return The dataStats. - */ - public com.google.cloud.automl.v1beta1.DataStats getDataStats() { - if (dataStatsBuilder_ == null) { - return dataStats_ == null - ? com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance() - : dataStats_; - } else { - return dataStatsBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - public Builder setDataStats(com.google.cloud.automl.v1beta1.DataStats value) { - if (dataStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - dataStats_ = value; - onChanged(); - } else { - dataStatsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - public Builder setDataStats(com.google.cloud.automl.v1beta1.DataStats.Builder builderForValue) { - if (dataStatsBuilder_ == null) { - dataStats_ = builderForValue.build(); - onChanged(); - } else { - dataStatsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - public Builder mergeDataStats(com.google.cloud.automl.v1beta1.DataStats value) { - if (dataStatsBuilder_ == null) { - if (dataStats_ != null) { - dataStats_ = - com.google.cloud.automl.v1beta1.DataStats.newBuilder(dataStats_) - .mergeFrom(value) - .buildPartial(); - } else { - dataStats_ = value; - } - onChanged(); - } else { - dataStatsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - public Builder clearDataStats() { - if (dataStatsBuilder_ == null) { - dataStats_ = null; - onChanged(); - } else { - dataStats_ = null; - dataStatsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - public com.google.cloud.automl.v1beta1.DataStats.Builder getDataStatsBuilder() { - - onChanged(); - return getDataStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - public com.google.cloud.automl.v1beta1.DataStatsOrBuilder getDataStatsOrBuilder() { - if (dataStatsBuilder_ != null) { - return dataStatsBuilder_.getMessageOrBuilder(); - } else { - return dataStats_ == null - ? com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance() - : dataStats_; - } - } - /** - * - * - *
-     * Output only. Stats of the series of values in the column.
-     * This field may be stale, see the ancestor's
-     * Dataset.tables_dataset_metadata.stats_update_time field
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataStats, - com.google.cloud.automl.v1beta1.DataStats.Builder, - com.google.cloud.automl.v1beta1.DataStatsOrBuilder> - getDataStatsFieldBuilder() { - if (dataStatsBuilder_ == null) { - dataStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataStats, - com.google.cloud.automl.v1beta1.DataStats.Builder, - com.google.cloud.automl.v1beta1.DataStatsOrBuilder>( - getDataStats(), getParentForChildren(), isClean()); - dataStats_ = null; - } - return dataStatsBuilder_; - } - - private java.util.List - topCorrelatedColumns_ = java.util.Collections.emptyList(); - - private void ensureTopCorrelatedColumnsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topCorrelatedColumns_ = - new java.util.ArrayList( - topCorrelatedColumns_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder> - topCorrelatedColumnsBuilder_; - - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public java.util.List - getTopCorrelatedColumnsList() { - if (topCorrelatedColumnsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topCorrelatedColumns_); - } else { - return topCorrelatedColumnsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public int getTopCorrelatedColumnsCount() { - if (topCorrelatedColumnsBuilder_ == null) { - return topCorrelatedColumns_.size(); - } else { - return topCorrelatedColumnsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn getTopCorrelatedColumns( - int index) { - if (topCorrelatedColumnsBuilder_ == null) { - return topCorrelatedColumns_.get(index); - } else { - return topCorrelatedColumnsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder setTopCorrelatedColumns( - int index, com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn value) { - if (topCorrelatedColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.set(index, value); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder setTopCorrelatedColumns( - int index, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder builderForValue) { - if (topCorrelatedColumnsBuilder_ == null) { - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.set(index, builderForValue.build()); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder addTopCorrelatedColumns( - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn value) { - if (topCorrelatedColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.add(value); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder addTopCorrelatedColumns( - int index, com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn value) { - if (topCorrelatedColumnsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.add(index, value); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder addTopCorrelatedColumns( - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder builderForValue) { - if (topCorrelatedColumnsBuilder_ == null) { - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.add(builderForValue.build()); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder addTopCorrelatedColumns( - int index, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder builderForValue) { - if (topCorrelatedColumnsBuilder_ == null) { - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.add(index, builderForValue.build()); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder addAllTopCorrelatedColumns( - java.lang.Iterable - values) { - if (topCorrelatedColumnsBuilder_ == null) { - ensureTopCorrelatedColumnsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topCorrelatedColumns_); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder clearTopCorrelatedColumns() { - if (topCorrelatedColumnsBuilder_ == null) { - topCorrelatedColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public Builder removeTopCorrelatedColumns(int index) { - if (topCorrelatedColumnsBuilder_ == null) { - ensureTopCorrelatedColumnsIsMutable(); - topCorrelatedColumns_.remove(index); - onChanged(); - } else { - topCorrelatedColumnsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder - getTopCorrelatedColumnsBuilder(int index) { - return getTopCorrelatedColumnsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder - getTopCorrelatedColumnsOrBuilder(int index) { - if (topCorrelatedColumnsBuilder_ == null) { - return topCorrelatedColumns_.get(index); - } else { - return topCorrelatedColumnsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder> - getTopCorrelatedColumnsOrBuilderList() { - if (topCorrelatedColumnsBuilder_ != null) { - return topCorrelatedColumnsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topCorrelatedColumns_); - } - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder - addTopCorrelatedColumnsBuilder() { - return getTopCorrelatedColumnsFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.getDefaultInstance()); - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder - addTopCorrelatedColumnsBuilder(int index) { - return getTopCorrelatedColumnsFieldBuilder() - .addBuilder( - index, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.getDefaultInstance()); - } - /** - * - * - *
-     * Deprecated.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - public java.util.List - getTopCorrelatedColumnsBuilderList() { - return getTopCorrelatedColumnsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder> - getTopCorrelatedColumnsFieldBuilder() { - if (topCorrelatedColumnsBuilder_ == null) { - topCorrelatedColumnsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn.Builder, - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder>( - topCorrelatedColumns_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - topCorrelatedColumns_ = null; - } - return topCorrelatedColumnsBuilder_; - } - - 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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ColumnSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ColumnSpec) - private static final com.google.cloud.automl.v1beta1.ColumnSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ColumnSpec(); - } - - public static com.google.cloud.automl.v1beta1.ColumnSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ColumnSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ColumnSpec(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ColumnSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java deleted file mode 100644 index b20d545da..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.automl.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ColumnSpecName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String dataset; - private final String tableSpec; - private final String columnSpec; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataset() { - return dataset; - } - - public String getTableSpec() { - return tableSpec; - } - - public String getColumnSpec() { - return columnSpec; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ColumnSpecName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataset = Preconditions.checkNotNull(builder.getDataset()); - tableSpec = Preconditions.checkNotNull(builder.getTableSpec()); - columnSpec = Preconditions.checkNotNull(builder.getColumnSpec()); - } - - public static ColumnSpecName of( - String project, String location, String dataset, String tableSpec, String columnSpec) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataset(dataset) - .setTableSpec(tableSpec) - .setColumnSpec(columnSpec) - .build(); - } - - public static String format( - String project, String location, String dataset, String tableSpec, String columnSpec) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataset(dataset) - .setTableSpec(tableSpec) - .setColumnSpec(columnSpec) - .build() - .toString(); - } - - public static ColumnSpecName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ColumnSpecName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("dataset"), - matchMap.get("table_spec"), - matchMap.get("column_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 (ColumnSpecName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldMapBuilder.put("dataset", dataset); - fieldMapBuilder.put("tableSpec", tableSpec); - fieldMapBuilder.put("columnSpec", columnSpec); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate( - "project", - project, - "location", - location, - "dataset", - dataset, - "table_spec", - tableSpec, - "column_spec", - columnSpec); - } - - /** Builder for ColumnSpecName. */ - public static class Builder { - - private String project; - private String location; - private String dataset; - private String tableSpec; - private String columnSpec; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataset() { - return dataset; - } - - public String getTableSpec() { - return tableSpec; - } - - public String getColumnSpec() { - return columnSpec; - } - - 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 setTableSpec(String tableSpec) { - this.tableSpec = tableSpec; - return this; - } - - public Builder setColumnSpec(String columnSpec) { - this.columnSpec = columnSpec; - return this; - } - - private Builder() {} - - private Builder(ColumnSpecName columnSpecName) { - project = columnSpecName.project; - location = columnSpecName.location; - dataset = columnSpecName.dataset; - tableSpec = columnSpecName.tableSpec; - columnSpec = columnSpecName.columnSpec; - } - - public ColumnSpecName build() { - return new ColumnSpecName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ColumnSpecName) { - ColumnSpecName that = (ColumnSpecName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataset.equals(that.dataset)) - && (this.tableSpec.equals(that.tableSpec)) - && (this.columnSpec.equals(that.columnSpec)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataset.hashCode(); - h *= 1000003; - h ^= tableSpec.hashCode(); - h *= 1000003; - h ^= columnSpec.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOrBuilder.java deleted file mode 100644 index 52cfc1cc2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOrBuilder.java +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/column_spec.proto - -package com.google.cloud.automl.v1beta1; - -public interface ColumnSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ColumnSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The resource name of the column specs.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name of the column specs.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * The data type of elements stored in the column.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - * - * @return Whether the dataType field is set. - */ - boolean hasDataType(); - /** - * - * - *
-   * The data type of elements stored in the column.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - * - * @return The dataType. - */ - com.google.cloud.automl.v1beta1.DataType getDataType(); - /** - * - * - *
-   * The data type of elements stored in the column.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType data_type = 2; - */ - com.google.cloud.automl.v1beta1.DataTypeOrBuilder getDataTypeOrBuilder(); - - /** - * - * - *
-   * Output only. The name of the column to show in the interface. The name can
-   * be up to 100 characters long and can consist only of ASCII Latin letters
-   * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-   * must start with a letter or a digit.
-   * 
- * - * string display_name = 3; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Output only. The name of the column to show in the interface. The name can
-   * be up to 100 characters long and can consist only of ASCII Latin letters
-   * A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and
-   * must start with a letter or a digit.
-   * 
- * - * string display_name = 3; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Output only. Stats of the series of values in the column.
-   * This field may be stale, see the ancestor's
-   * Dataset.tables_dataset_metadata.stats_update_time field
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - * - * @return Whether the dataStats field is set. - */ - boolean hasDataStats(); - /** - * - * - *
-   * Output only. Stats of the series of values in the column.
-   * This field may be stale, see the ancestor's
-   * Dataset.tables_dataset_metadata.stats_update_time field
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - * - * @return The dataStats. - */ - com.google.cloud.automl.v1beta1.DataStats getDataStats(); - /** - * - * - *
-   * Output only. Stats of the series of values in the column.
-   * This field may be stale, see the ancestor's
-   * Dataset.tables_dataset_metadata.stats_update_time field
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * .google.cloud.automl.v1beta1.DataStats data_stats = 4; - */ - com.google.cloud.automl.v1beta1.DataStatsOrBuilder getDataStatsOrBuilder(); - - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - java.util.List - getTopCorrelatedColumnsList(); - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn getTopCorrelatedColumns(int index); - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - int getTopCorrelatedColumnsCount(); - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - java.util.List - getTopCorrelatedColumnsOrBuilderList(); - /** - * - * - *
-   * Deprecated.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumn top_correlated_columns = 5; - * - */ - com.google.cloud.automl.v1beta1.ColumnSpec.CorrelatedColumnOrBuilder - getTopCorrelatedColumnsOrBuilder(int index); - - /** - * - * - *
-   * 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(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOuterClass.java deleted file mode 100644 index a8bac9cf2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecOuterClass.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/column_spec.proto - -package com.google.cloud.automl.v1beta1; - -public final class ColumnSpecOuterClass { - private ColumnSpecOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ColumnSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ColumnSpec_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n-google/cloud/automl/v1beta1/column_spe" - + "c.proto\022\033google.cloud.automl.v1beta1\032\031go" - + "ogle/api/resource.proto\032,google/cloud/au" - + "toml/v1beta1/data_stats.proto\032,google/cl" - + "oud/automl/v1beta1/data_types.proto\032\034goo" - + "gle/api/annotations.proto\"\233\004\n\nColumnSpec" - + "\022\014\n\004name\030\001 \001(\t\0228\n\tdata_type\030\002 \001(\0132%.goog" - + "le.cloud.automl.v1beta1.DataType\022\024\n\014disp" - + "lay_name\030\003 \001(\t\022:\n\ndata_stats\030\004 \001(\0132&.goo" - + "gle.cloud.automl.v1beta1.DataStats\022X\n\026to" - + "p_correlated_columns\030\005 \003(\01328.google.clou" - + "d.automl.v1beta1.ColumnSpec.CorrelatedCo" - + "lumn\022\014\n\004etag\030\006 \001(\t\032t\n\020CorrelatedColumn\022\026" - + "\n\016column_spec_id\030\001 \001(\t\022H\n\021correlation_st" - + "ats\030\002 \001(\0132-.google.cloud.automl.v1beta1." - + "CorrelationStats:\224\001\352A\220\001\n automl.googleap" - + "is.com/ColumnSpec\022lprojects/{project}/lo" - + "cations/{location}/datasets/{dataset}/ta" - + "bleSpecs/{table_spec}/columnSpecs/{colum" - + "n_spec}B\245\001\n\037com.google.cloud.automl.v1be" - + "ta1P\001ZAgoogle.golang.org/genproto/google" - + "apis/cloud/automl/v1beta1;automl\312\002\033Googl" - + "e\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Cloud::" - + "AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.automl.v1beta1.DataStatsOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.DataTypes.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_ColumnSpec_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_ColumnSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ColumnSpec_descriptor, - new java.lang.String[] { - "Name", "DataType", "DisplayName", "DataStats", "TopCorrelatedColumns", "Etag", - }); - internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_descriptor = - internal_static_google_cloud_automl_v1beta1_ColumnSpec_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ColumnSpec_CorrelatedColumn_descriptor, - new java.lang.String[] { - "ColumnSpecId", "CorrelationStats", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.automl.v1beta1.DataStatsOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.DataTypes.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStats.java deleted file mode 100644 index 39800ae9b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStats.java +++ /dev/null @@ -1,551 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A correlation statistics between two series of DataType values. The series
- * may have differing DataType-s, but within a single series the DataType must
- * be the same.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CorrelationStats} - */ -public final class CorrelationStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.CorrelationStats) - CorrelationStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use CorrelationStats.newBuilder() to construct. - private CorrelationStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CorrelationStats() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CorrelationStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CorrelationStats( - 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: - { - cramersV_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CorrelationStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CorrelationStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CorrelationStats.class, - com.google.cloud.automl.v1beta1.CorrelationStats.Builder.class); - } - - public static final int CRAMERS_V_FIELD_NUMBER = 1; - private double cramersV_; - /** - * - * - *
-   * The correlation value using the Cramer's V measure.
-   * 
- * - * double cramers_v = 1; - * - * @return The cramersV. - */ - public double getCramersV() { - return cramersV_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (cramersV_ != 0D) { - output.writeDouble(1, cramersV_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (cramersV_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, cramersV_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.CorrelationStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.CorrelationStats other = - (com.google.cloud.automl.v1beta1.CorrelationStats) obj; - - if (java.lang.Double.doubleToLongBits(getCramersV()) - != java.lang.Double.doubleToLongBits(other.getCramersV())) return false; - if (!unknownFields.equals(other.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) + CRAMERS_V_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getCramersV())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.CorrelationStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 correlation statistics between two series of DataType values. The series
-   * may have differing DataType-s, but within a single series the DataType must
-   * be the same.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CorrelationStats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.CorrelationStats) - com.google.cloud.automl.v1beta1.CorrelationStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CorrelationStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CorrelationStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CorrelationStats.class, - com.google.cloud.automl.v1beta1.CorrelationStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.CorrelationStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - cramersV_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_CorrelationStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CorrelationStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.CorrelationStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CorrelationStats build() { - com.google.cloud.automl.v1beta1.CorrelationStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CorrelationStats buildPartial() { - com.google.cloud.automl.v1beta1.CorrelationStats result = - new com.google.cloud.automl.v1beta1.CorrelationStats(this); - result.cramersV_ = cramersV_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.CorrelationStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.CorrelationStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.CorrelationStats other) { - if (other == com.google.cloud.automl.v1beta1.CorrelationStats.getDefaultInstance()) - return this; - if (other.getCramersV() != 0D) { - setCramersV(other.getCramersV()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.CorrelationStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.CorrelationStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double cramersV_; - /** - * - * - *
-     * The correlation value using the Cramer's V measure.
-     * 
- * - * double cramers_v = 1; - * - * @return The cramersV. - */ - public double getCramersV() { - return cramersV_; - } - /** - * - * - *
-     * The correlation value using the Cramer's V measure.
-     * 
- * - * double cramers_v = 1; - * - * @param value The cramersV to set. - * @return This builder for chaining. - */ - public Builder setCramersV(double value) { - - cramersV_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The correlation value using the Cramer's V measure.
-     * 
- * - * double cramers_v = 1; - * - * @return This builder for chaining. - */ - public Builder clearCramersV() { - - cramersV_ = 0D; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.CorrelationStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.CorrelationStats) - private static final com.google.cloud.automl.v1beta1.CorrelationStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.CorrelationStats(); - } - - public static com.google.cloud.automl.v1beta1.CorrelationStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CorrelationStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CorrelationStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CorrelationStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStatsOrBuilder.java deleted file mode 100644 index edca46515..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CorrelationStatsOrBuilder.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface CorrelationStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.CorrelationStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The correlation value using the Cramer's V measure.
-   * 
- * - * double cramers_v = 1; - * - * @return The cramersV. - */ - double getCramersV(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequest.java deleted file mode 100644 index 5256cbe2e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequest.java +++ /dev/null @@ -1,946 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CreateDatasetRequest} - */ -public final class CreateDatasetRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset.Builder subBuilder = null; - if (dataset_ != null) { - subBuilder = dataset_.toBuilder(); - } - dataset_ = - input.readMessage( - com.google.cloud.automl.v1beta1.Dataset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataset_); - dataset_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CreateDatasetRequest.class, - com.google.cloud.automl.v1beta1.CreateDatasetRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource name of the project to create the dataset for.
-   * 
- * - * - * 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) { - 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 project to create the dataset for.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATASET_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.Dataset dataset_; - /** - * - * - *
-   * Required. The dataset to create.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataset field is set. - */ - public boolean hasDataset() { - return dataset_ != null; - } - /** - * - * - *
-   * Required. The dataset to create.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataset. - */ - public com.google.cloud.automl.v1beta1.Dataset getDataset() { - return dataset_ == null - ? com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance() - : dataset_; - } - /** - * - * - *
-   * Required. The dataset to create.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetOrBuilder() { - return getDataset(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (dataset_ != null) { - output.writeMessage(2, getDataset()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (dataset_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataset()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.CreateDatasetRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.CreateDatasetRequest other = - (com.google.cloud.automl.v1beta1.CreateDatasetRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasDataset() != other.hasDataset()) return false; - if (hasDataset()) { - if (!getDataset().equals(other.getDataset())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasDataset()) { - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.CreateDatasetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CreateDatasetRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.CreateDatasetRequest) - com.google.cloud.automl.v1beta1.CreateDatasetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CreateDatasetRequest.class, - com.google.cloud.automl.v1beta1.CreateDatasetRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.CreateDatasetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (datasetBuilder_ == null) { - dataset_ = null; - } else { - dataset_ = null; - datasetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateDatasetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateDatasetRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.CreateDatasetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateDatasetRequest build() { - com.google.cloud.automl.v1beta1.CreateDatasetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateDatasetRequest buildPartial() { - com.google.cloud.automl.v1beta1.CreateDatasetRequest result = - new com.google.cloud.automl.v1beta1.CreateDatasetRequest(this); - result.parent_ = parent_; - if (datasetBuilder_ == null) { - result.dataset_ = dataset_; - } else { - result.dataset_ = datasetBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.CreateDatasetRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.CreateDatasetRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.CreateDatasetRequest other) { - if (other == com.google.cloud.automl.v1beta1.CreateDatasetRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasDataset()) { - mergeDataset(other.getDataset()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.CreateDatasetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.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 project to create the dataset for.
-     * 
- * - * - * 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 project to create the dataset for.
-     * 
- * - * - * 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 project to create the dataset for.
-     * 
- * - * - * 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 project to create the dataset for.
-     * 
- * - * - * 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 project to create the dataset for.
-     * 
- * - * - * 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.automl.v1beta1.Dataset dataset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder> - datasetBuilder_; - /** - * - * - *
-     * Required. The dataset to create.
-     * 
- * - * - * .google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataset. - */ - public com.google.cloud.automl.v1beta1.Dataset getDataset() { - if (datasetBuilder_ == null) { - return dataset_ == null - ? com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance() - : dataset_; - } else { - return datasetBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The dataset to create.
-     * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataset(com.google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataset(com.google.cloud.automl.v1beta1.Dataset.Builder builderForValue) { - if (datasetBuilder_ == null) { - dataset_ = builderForValue.build(); - onChanged(); - } else { - datasetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The dataset to create.
-     * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDataset(com.google.cloud.automl.v1beta1.Dataset value) { - if (datasetBuilder_ == null) { - if (dataset_ != null) { - dataset_ = - com.google.cloud.automl.v1beta1.Dataset.newBuilder(dataset_) - .mergeFrom(value) - .buildPartial(); - } else { - dataset_ = value; - } - onChanged(); - } else { - datasetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The dataset to create.
-     * 
- * - * - * .google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.Dataset.Builder getDatasetBuilder() { - - onChanged(); - return getDatasetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The dataset to create.
-     * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetOrBuilder() { - if (datasetBuilder_ != null) { - return datasetBuilder_.getMessageOrBuilder(); - } else { - return dataset_ == null - ? com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance() - : dataset_; - } - } - /** - * - * - *
-     * Required. The dataset to create.
-     * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder> - getDatasetFieldBuilder() { - if (datasetBuilder_ == null) { - datasetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder>( - getDataset(), getParentForChildren(), isClean()); - dataset_ = null; - } - return datasetBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.CreateDatasetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.CreateDatasetRequest) - private static final com.google.cloud.automl.v1beta1.CreateDatasetRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.CreateDatasetRequest(); - } - - public static com.google.cloud.automl.v1beta1.CreateDatasetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateDatasetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateDatasetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateDatasetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequestOrBuilder.java deleted file mode 100644 index bad2a23f5..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateDatasetRequestOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface CreateDatasetRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.CreateDatasetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the project to create the dataset for.
-   * 
- * - * - * 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 project to create the dataset for.
-   * 
- * - * - * 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.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataset field is set. - */ - boolean hasDataset(); - /** - * - * - *
-   * Required. The dataset to create.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataset. - */ - com.google.cloud.automl.v1beta1.Dataset getDataset(); - /** - * - * - *
-   * Required. The dataset to create.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadata.java deleted file mode 100644 index 35d5be3d2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadata.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of CreateModel operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CreateModelOperationMetadata} - */ -public final class CreateModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.CreateModelOperationMetadata) - CreateModelOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateModelOperationMetadata.newBuilder() to construct. - private CreateModelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateModelOperationMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateModelOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateModelOperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.CreateModelOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata other = - (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Details of CreateModel operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CreateModelOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.CreateModelOperationMetadata) - com.google.cloud.automl.v1beta1.CreateModelOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadata build() { - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata result = - new com.google.cloud.automl.v1beta1.CreateModelOperationMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.CreateModelOperationMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.CreateModelOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.CreateModelOperationMetadata) - private static final com.google.cloud.automl.v1beta1.CreateModelOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.CreateModelOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.CreateModelOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateModelOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateModelOperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadataOrBuilder.java deleted file mode 100644 index 6887f797e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelOperationMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface CreateModelOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.CreateModelOperationMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequest.java deleted file mode 100644 index e8d6f2ec7..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequest.java +++ /dev/null @@ -1,928 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CreateModelRequest} - */ -public final class CreateModelRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.CreateModelRequest) - CreateModelRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateModelRequest.newBuilder() to construct. - private CreateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateModelRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateModelRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private CreateModelRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - parent_ = s; - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.Model.Builder subBuilder = null; - if (model_ != null) { - subBuilder = model_.toBuilder(); - } - model_ = - input.readMessage( - com.google.cloud.automl.v1beta1.Model.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(model_); - model_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CreateModelRequest.class, - com.google.cloud.automl.v1beta1.CreateModelRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. Resource name of the parent project where the model is being created.
-   * 
- * - * - * 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) { - 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. Resource name of the parent project where the model is being created.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_FIELD_NUMBER = 4; - private com.google.cloud.automl.v1beta1.Model model_; - /** - * - * - *
-   * Required. The model to create.
-   * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the model field is set. - */ - public boolean hasModel() { - return model_ != null; - } - /** - * - * - *
-   * Required. The model to create.
-   * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The model. - */ - public com.google.cloud.automl.v1beta1.Model getModel() { - return model_ == null ? com.google.cloud.automl.v1beta1.Model.getDefaultInstance() : model_; - } - /** - * - * - *
-   * Required. The model to create.
-   * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ModelOrBuilder getModelOrBuilder() { - return getModel(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (model_ != null) { - output.writeMessage(4, getModel()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (model_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getModel()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.CreateModelRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.CreateModelRequest other = - (com.google.cloud.automl.v1beta1.CreateModelRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasModel() != other.hasModel()) return false; - if (hasModel()) { - if (!getModel().equals(other.getModel())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasModel()) { - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModel().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.CreateModelRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.CreateModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.CreateModelRequest) - com.google.cloud.automl.v1beta1.CreateModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.CreateModelRequest.class, - com.google.cloud.automl.v1beta1.CreateModelRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.CreateModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - if (modelBuilder_ == null) { - model_ = null; - } else { - model_ = null; - modelBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_CreateModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.CreateModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelRequest build() { - com.google.cloud.automl.v1beta1.CreateModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelRequest buildPartial() { - com.google.cloud.automl.v1beta1.CreateModelRequest result = - new com.google.cloud.automl.v1beta1.CreateModelRequest(this); - result.parent_ = parent_; - if (modelBuilder_ == null) { - result.model_ = model_; - } else { - result.model_ = modelBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.CreateModelRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.CreateModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.CreateModelRequest other) { - if (other == com.google.cloud.automl.v1beta1.CreateModelRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasModel()) { - mergeModel(other.getModel()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.CreateModelRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.CreateModelRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Resource name of the parent project where the model is being created.
-     * 
- * - * - * 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. Resource name of the parent project where the model is being created.
-     * 
- * - * - * 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. Resource name of the parent project where the model is being created.
-     * 
- * - * - * 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. Resource name of the parent project where the model is being created.
-     * 
- * - * - * 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. Resource name of the parent project where the model is being created.
-     * 
- * - * - * 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.automl.v1beta1.Model model_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Model, - com.google.cloud.automl.v1beta1.Model.Builder, - com.google.cloud.automl.v1beta1.ModelOrBuilder> - modelBuilder_; - /** - * - * - *
-     * Required. The model to create.
-     * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.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.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The model. - */ - public com.google.cloud.automl.v1beta1.Model getModel() { - if (modelBuilder_ == null) { - return model_ == null ? com.google.cloud.automl.v1beta1.Model.getDefaultInstance() : model_; - } else { - return modelBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The model to create.
-     * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setModel(com.google.cloud.automl.v1beta1.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.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setModel(com.google.cloud.automl.v1beta1.Model.Builder builderForValue) { - if (modelBuilder_ == null) { - model_ = builderForValue.build(); - onChanged(); - } else { - modelBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The model to create.
-     * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeModel(com.google.cloud.automl.v1beta1.Model value) { - if (modelBuilder_ == null) { - if (model_ != null) { - model_ = - com.google.cloud.automl.v1beta1.Model.newBuilder(model_) - .mergeFrom(value) - .buildPartial(); - } else { - model_ = value; - } - onChanged(); - } else { - modelBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The model to create.
-     * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.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.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.Model.Builder getModelBuilder() { - - onChanged(); - return getModelFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The model to create.
-     * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ModelOrBuilder getModelOrBuilder() { - if (modelBuilder_ != null) { - return modelBuilder_.getMessageOrBuilder(); - } else { - return model_ == null ? com.google.cloud.automl.v1beta1.Model.getDefaultInstance() : model_; - } - } - /** - * - * - *
-     * Required. The model to create.
-     * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Model, - com.google.cloud.automl.v1beta1.Model.Builder, - com.google.cloud.automl.v1beta1.ModelOrBuilder> - getModelFieldBuilder() { - if (modelBuilder_ == null) { - modelBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Model, - com.google.cloud.automl.v1beta1.Model.Builder, - com.google.cloud.automl.v1beta1.ModelOrBuilder>( - getModel(), getParentForChildren(), isClean()); - model_ = null; - } - return modelBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.CreateModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.CreateModelRequest) - private static final com.google.cloud.automl.v1beta1.CreateModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.CreateModelRequest(); - } - - public static com.google.cloud.automl.v1beta1.CreateModelRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateModelRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateModelRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.CreateModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequestOrBuilder.java deleted file mode 100644 index ac81a5dc9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/CreateModelRequestOrBuilder.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface CreateModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.CreateModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of the parent project where the model is being created.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Resource name of the parent project where the model is being created.
-   * 
- * - * - * 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.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the model field is set. - */ - boolean hasModel(); - /** - * - * - *
-   * Required. The model to create.
-   * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The model. - */ - com.google.cloud.automl.v1beta1.Model getModel(); - /** - * - * - *
-   * Required. The model to create.
-   * 
- * - * .google.cloud.automl.v1beta1.Model model = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.ModelOrBuilder getModelOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataItems.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataItems.java deleted file mode 100644 index 6a543997e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataItems.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -public final class DataItems { - private DataItems() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Image_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Image_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextSnippet_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextSnippet_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DocumentDimensions_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DocumentDimensions_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Document_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Document_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Document_Layout_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Document_Layout_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Row_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Row_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExamplePayload_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExamplePayload_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/automl/v1beta1/data_items" - + ".proto\022\033google.cloud.automl.v1beta1\032*goo" - + "gle/cloud/automl/v1beta1/geometry.proto\032" - + "$google/cloud/automl/v1beta1/io.proto\032*g" - + "oogle/cloud/automl/v1beta1/temporal.prot" - + "o\032.google/cloud/automl/v1beta1/text_segm" - + "ent.proto\032\031google/protobuf/any.proto\032\036go" - + "ogle/protobuf/duration.proto\032\034google/pro" - + "tobuf/struct.proto\032\034google/api/annotatio" - + "ns.proto\"\177\n\005Image\022\025\n\013image_bytes\030\001 \001(\014H\000" - + "\022@\n\014input_config\030\006 \001(\0132(.google.cloud.au" - + "toml.v1beta1.InputConfigH\000\022\025\n\rthumbnail_" - + "uri\030\004 \001(\tB\006\n\004data\"F\n\013TextSnippet\022\017\n\007cont" - + "ent\030\001 \001(\t\022\021\n\tmime_type\030\002 \001(\t\022\023\n\013content_" - + "uri\030\004 \001(\t\"\357\001\n\022DocumentDimensions\022S\n\004unit" - + "\030\001 \001(\0162E.google.cloud.automl.v1beta1.Doc" - + "umentDimensions.DocumentDimensionUnit\022\r\n" - + "\005width\030\002 \001(\002\022\016\n\006height\030\003 \001(\002\"e\n\025Document" - + "DimensionUnit\022\'\n#DOCUMENT_DIMENSION_UNIT" - + "_UNSPECIFIED\020\000\022\010\n\004INCH\020\001\022\016\n\nCENTIMETER\020\002" - + "\022\t\n\005POINT\020\003\"\371\005\n\010Document\022F\n\014input_config" - + "\030\001 \001(\01320.google.cloud.automl.v1beta1.Doc" - + "umentInputConfig\022?\n\rdocument_text\030\002 \001(\0132" - + "(.google.cloud.automl.v1beta1.TextSnippe" - + "t\022<\n\006layout\030\003 \003(\0132,.google.cloud.automl." - + "v1beta1.Document.Layout\022L\n\023document_dime" - + "nsions\030\004 \001(\0132/.google.cloud.automl.v1bet" - + "a1.DocumentDimensions\022\022\n\npage_count\030\005 \001(" - + "\005\032\303\003\n\006Layout\022>\n\014text_segment\030\001 \001(\0132(.goo" - + "gle.cloud.automl.v1beta1.TextSegment\022\023\n\013" - + "page_number\030\002 \001(\005\022@\n\rbounding_poly\030\003 \001(\013" - + "2).google.cloud.automl.v1beta1.BoundingP" - + "oly\022W\n\021text_segment_type\030\004 \001(\0162<.google." - + "cloud.automl.v1beta1.Document.Layout.Tex" - + "tSegmentType\"\310\001\n\017TextSegmentType\022!\n\035TEXT" - + "_SEGMENT_TYPE_UNSPECIFIED\020\000\022\t\n\005TOKEN\020\001\022\r" - + "\n\tPARAGRAPH\020\002\022\016\n\nFORM_FIELD\020\003\022\023\n\017FORM_FI" - + "ELD_NAME\020\004\022\027\n\023FORM_FIELD_CONTENTS\020\005\022\t\n\005T" - + "ABLE\020\006\022\020\n\014TABLE_HEADER\020\007\022\r\n\tTABLE_ROW\020\010\022" - + "\016\n\nTABLE_CELL\020\t\"F\n\003Row\022\027\n\017column_spec_id" - + "s\030\002 \003(\t\022&\n\006values\030\003 \003(\0132\026.google.protobu" - + "f.Value\"\376\001\n\016ExamplePayload\0223\n\005image\030\001 \001(" - + "\0132\".google.cloud.automl.v1beta1.ImageH\000\022" - + "@\n\014text_snippet\030\002 \001(\0132(.google.cloud.aut" - + "oml.v1beta1.TextSnippetH\000\0229\n\010document\030\004 " - + "\001(\0132%.google.cloud.automl.v1beta1.Docume" - + "ntH\000\022/\n\003row\030\003 \001(\0132 .google.cloud.automl." - + "v1beta1.RowH\000B\t\n\007payloadB\245\001\n\037com.google." - + "cloud.automl.v1beta1P\001ZAgoogle.golang.or" - + "g/genproto/googleapis/cloud/automl/v1bet" - + "a1;automl\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352" - + "\002\036Google::Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.Geometry.getDescriptor(), - com.google.cloud.automl.v1beta1.Io.getDescriptor(), - com.google.cloud.automl.v1beta1.Temporal.getDescriptor(), - com.google.cloud.automl.v1beta1.TextSegmentProto.getDescriptor(), - com.google.protobuf.AnyProto.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_Image_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_Image_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Image_descriptor, - new java.lang.String[] { - "ImageBytes", "InputConfig", "ThumbnailUri", "Data", - }); - internal_static_google_cloud_automl_v1beta1_TextSnippet_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_TextSnippet_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextSnippet_descriptor, - new java.lang.String[] { - "Content", "MimeType", "ContentUri", - }); - internal_static_google_cloud_automl_v1beta1_DocumentDimensions_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_DocumentDimensions_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DocumentDimensions_descriptor, - new java.lang.String[] { - "Unit", "Width", "Height", - }); - internal_static_google_cloud_automl_v1beta1_Document_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_Document_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Document_descriptor, - new java.lang.String[] { - "InputConfig", "DocumentText", "Layout", "DocumentDimensions", "PageCount", - }); - internal_static_google_cloud_automl_v1beta1_Document_Layout_descriptor = - internal_static_google_cloud_automl_v1beta1_Document_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_automl_v1beta1_Document_Layout_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Document_Layout_descriptor, - new java.lang.String[] { - "TextSegment", "PageNumber", "BoundingPoly", "TextSegmentType", - }); - internal_static_google_cloud_automl_v1beta1_Row_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_Row_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Row_descriptor, - new java.lang.String[] { - "ColumnSpecIds", "Values", - }); - internal_static_google_cloud_automl_v1beta1_ExamplePayload_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_automl_v1beta1_ExamplePayload_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExamplePayload_descriptor, - new java.lang.String[] { - "Image", "TextSnippet", "Document", "Row", "Payload", - }); - com.google.cloud.automl.v1beta1.Geometry.getDescriptor(); - com.google.cloud.automl.v1beta1.Io.getDescriptor(); - com.google.cloud.automl.v1beta1.Temporal.getDescriptor(); - com.google.cloud.automl.v1beta1.TextSegmentProto.getDescriptor(); - com.google.protobuf.AnyProto.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStats.java deleted file mode 100644 index e939ce02b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStats.java +++ /dev/null @@ -1,2591 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The data statistics of a series of values that share the same DataType.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DataStats} - */ -public final class DataStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.DataStats) - DataStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataStats.newBuilder() to construct. - private DataStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataStats() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DataStats( - 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: - { - distinctValueCount_ = input.readInt64(); - break; - } - case 16: - { - nullValueCount_ = input.readInt64(); - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.Float64Stats.Builder subBuilder = null; - if (statsCase_ == 3) { - subBuilder = ((com.google.cloud.automl.v1beta1.Float64Stats) stats_).toBuilder(); - } - stats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.Float64Stats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.Float64Stats) stats_); - stats_ = subBuilder.buildPartial(); - } - statsCase_ = 3; - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.StringStats.Builder subBuilder = null; - if (statsCase_ == 4) { - subBuilder = ((com.google.cloud.automl.v1beta1.StringStats) stats_).toBuilder(); - } - stats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.StringStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.StringStats) stats_); - stats_ = subBuilder.buildPartial(); - } - statsCase_ = 4; - break; - } - case 42: - { - com.google.cloud.automl.v1beta1.TimestampStats.Builder subBuilder = null; - if (statsCase_ == 5) { - subBuilder = ((com.google.cloud.automl.v1beta1.TimestampStats) stats_).toBuilder(); - } - stats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TimestampStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.TimestampStats) stats_); - stats_ = subBuilder.buildPartial(); - } - statsCase_ = 5; - break; - } - case 50: - { - com.google.cloud.automl.v1beta1.ArrayStats.Builder subBuilder = null; - if (statsCase_ == 6) { - subBuilder = ((com.google.cloud.automl.v1beta1.ArrayStats) stats_).toBuilder(); - } - stats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ArrayStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.ArrayStats) stats_); - stats_ = subBuilder.buildPartial(); - } - statsCase_ = 6; - break; - } - case 58: - { - com.google.cloud.automl.v1beta1.StructStats.Builder subBuilder = null; - if (statsCase_ == 7) { - subBuilder = ((com.google.cloud.automl.v1beta1.StructStats) stats_).toBuilder(); - } - stats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.StructStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.StructStats) stats_); - stats_ = subBuilder.buildPartial(); - } - statsCase_ = 7; - break; - } - case 66: - { - com.google.cloud.automl.v1beta1.CategoryStats.Builder subBuilder = null; - if (statsCase_ == 8) { - subBuilder = ((com.google.cloud.automl.v1beta1.CategoryStats) stats_).toBuilder(); - } - stats_ = - input.readMessage( - com.google.cloud.automl.v1beta1.CategoryStats.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.CategoryStats) stats_); - stats_ = subBuilder.buildPartial(); - } - statsCase_ = 8; - break; - } - case 72: - { - validValueCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_DataStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_DataStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DataStats.class, - com.google.cloud.automl.v1beta1.DataStats.Builder.class); - } - - private int statsCase_ = 0; - private java.lang.Object stats_; - - public enum StatsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - FLOAT64_STATS(3), - STRING_STATS(4), - TIMESTAMP_STATS(5), - ARRAY_STATS(6), - STRUCT_STATS(7), - CATEGORY_STATS(8), - STATS_NOT_SET(0); - private final int value; - - private StatsCase(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 StatsCase valueOf(int value) { - return forNumber(value); - } - - public static StatsCase forNumber(int value) { - switch (value) { - case 3: - return FLOAT64_STATS; - case 4: - return STRING_STATS; - case 5: - return TIMESTAMP_STATS; - case 6: - return ARRAY_STATS; - case 7: - return STRUCT_STATS; - case 8: - return CATEGORY_STATS; - case 0: - return STATS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public StatsCase getStatsCase() { - return StatsCase.forNumber(statsCase_); - } - - public static final int FLOAT64_STATS_FIELD_NUMBER = 3; - /** - * - * - *
-   * The statistics for FLOAT64 DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - * - * @return Whether the float64Stats field is set. - */ - public boolean hasFloat64Stats() { - return statsCase_ == 3; - } - /** - * - * - *
-   * The statistics for FLOAT64 DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - * - * @return The float64Stats. - */ - public com.google.cloud.automl.v1beta1.Float64Stats getFloat64Stats() { - if (statsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Float64Stats) stats_; - } - return com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance(); - } - /** - * - * - *
-   * The statistics for FLOAT64 DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - public com.google.cloud.automl.v1beta1.Float64StatsOrBuilder getFloat64StatsOrBuilder() { - if (statsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Float64Stats) stats_; - } - return com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance(); - } - - public static final int STRING_STATS_FIELD_NUMBER = 4; - /** - * - * - *
-   * The statistics for STRING DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - * - * @return Whether the stringStats field is set. - */ - public boolean hasStringStats() { - return statsCase_ == 4; - } - /** - * - * - *
-   * The statistics for STRING DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - * - * @return The stringStats. - */ - public com.google.cloud.automl.v1beta1.StringStats getStringStats() { - if (statsCase_ == 4) { - return (com.google.cloud.automl.v1beta1.StringStats) stats_; - } - return com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance(); - } - /** - * - * - *
-   * The statistics for STRING DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - public com.google.cloud.automl.v1beta1.StringStatsOrBuilder getStringStatsOrBuilder() { - if (statsCase_ == 4) { - return (com.google.cloud.automl.v1beta1.StringStats) stats_; - } - return com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance(); - } - - public static final int TIMESTAMP_STATS_FIELD_NUMBER = 5; - /** - * - * - *
-   * The statistics for TIMESTAMP DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - * - * @return Whether the timestampStats field is set. - */ - public boolean hasTimestampStats() { - return statsCase_ == 5; - } - /** - * - * - *
-   * The statistics for TIMESTAMP DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - * - * @return The timestampStats. - */ - public com.google.cloud.automl.v1beta1.TimestampStats getTimestampStats() { - if (statsCase_ == 5) { - return (com.google.cloud.automl.v1beta1.TimestampStats) stats_; - } - return com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance(); - } - /** - * - * - *
-   * The statistics for TIMESTAMP DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - public com.google.cloud.automl.v1beta1.TimestampStatsOrBuilder getTimestampStatsOrBuilder() { - if (statsCase_ == 5) { - return (com.google.cloud.automl.v1beta1.TimestampStats) stats_; - } - return com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance(); - } - - public static final int ARRAY_STATS_FIELD_NUMBER = 6; - /** - * - * - *
-   * The statistics for ARRAY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - * - * @return Whether the arrayStats field is set. - */ - public boolean hasArrayStats() { - return statsCase_ == 6; - } - /** - * - * - *
-   * The statistics for ARRAY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - * - * @return The arrayStats. - */ - public com.google.cloud.automl.v1beta1.ArrayStats getArrayStats() { - if (statsCase_ == 6) { - return (com.google.cloud.automl.v1beta1.ArrayStats) stats_; - } - return com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance(); - } - /** - * - * - *
-   * The statistics for ARRAY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - public com.google.cloud.automl.v1beta1.ArrayStatsOrBuilder getArrayStatsOrBuilder() { - if (statsCase_ == 6) { - return (com.google.cloud.automl.v1beta1.ArrayStats) stats_; - } - return com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance(); - } - - public static final int STRUCT_STATS_FIELD_NUMBER = 7; - /** - * - * - *
-   * The statistics for STRUCT DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - * - * @return Whether the structStats field is set. - */ - public boolean hasStructStats() { - return statsCase_ == 7; - } - /** - * - * - *
-   * The statistics for STRUCT DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - * - * @return The structStats. - */ - public com.google.cloud.automl.v1beta1.StructStats getStructStats() { - if (statsCase_ == 7) { - return (com.google.cloud.automl.v1beta1.StructStats) stats_; - } - return com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance(); - } - /** - * - * - *
-   * The statistics for STRUCT DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - public com.google.cloud.automl.v1beta1.StructStatsOrBuilder getStructStatsOrBuilder() { - if (statsCase_ == 7) { - return (com.google.cloud.automl.v1beta1.StructStats) stats_; - } - return com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance(); - } - - public static final int CATEGORY_STATS_FIELD_NUMBER = 8; - /** - * - * - *
-   * The statistics for CATEGORY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - * - * @return Whether the categoryStats field is set. - */ - public boolean hasCategoryStats() { - return statsCase_ == 8; - } - /** - * - * - *
-   * The statistics for CATEGORY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - * - * @return The categoryStats. - */ - public com.google.cloud.automl.v1beta1.CategoryStats getCategoryStats() { - if (statsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.CategoryStats) stats_; - } - return com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance(); - } - /** - * - * - *
-   * The statistics for CATEGORY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - public com.google.cloud.automl.v1beta1.CategoryStatsOrBuilder getCategoryStatsOrBuilder() { - if (statsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.CategoryStats) stats_; - } - return com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance(); - } - - public static final int DISTINCT_VALUE_COUNT_FIELD_NUMBER = 1; - private long distinctValueCount_; - /** - * - * - *
-   * The number of distinct values.
-   * 
- * - * int64 distinct_value_count = 1; - * - * @return The distinctValueCount. - */ - public long getDistinctValueCount() { - return distinctValueCount_; - } - - public static final int NULL_VALUE_COUNT_FIELD_NUMBER = 2; - private long nullValueCount_; - /** - * - * - *
-   * The number of values that are null.
-   * 
- * - * int64 null_value_count = 2; - * - * @return The nullValueCount. - */ - public long getNullValueCount() { - return nullValueCount_; - } - - public static final int VALID_VALUE_COUNT_FIELD_NUMBER = 9; - private long validValueCount_; - /** - * - * - *
-   * The number of values that are valid.
-   * 
- * - * int64 valid_value_count = 9; - * - * @return The validValueCount. - */ - public long getValidValueCount() { - return validValueCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (distinctValueCount_ != 0L) { - output.writeInt64(1, distinctValueCount_); - } - if (nullValueCount_ != 0L) { - output.writeInt64(2, nullValueCount_); - } - if (statsCase_ == 3) { - output.writeMessage(3, (com.google.cloud.automl.v1beta1.Float64Stats) stats_); - } - if (statsCase_ == 4) { - output.writeMessage(4, (com.google.cloud.automl.v1beta1.StringStats) stats_); - } - if (statsCase_ == 5) { - output.writeMessage(5, (com.google.cloud.automl.v1beta1.TimestampStats) stats_); - } - if (statsCase_ == 6) { - output.writeMessage(6, (com.google.cloud.automl.v1beta1.ArrayStats) stats_); - } - if (statsCase_ == 7) { - output.writeMessage(7, (com.google.cloud.automl.v1beta1.StructStats) stats_); - } - if (statsCase_ == 8) { - output.writeMessage(8, (com.google.cloud.automl.v1beta1.CategoryStats) stats_); - } - if (validValueCount_ != 0L) { - output.writeInt64(9, validValueCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (distinctValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, distinctValueCount_); - } - if (nullValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, nullValueCount_); - } - if (statsCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.automl.v1beta1.Float64Stats) stats_); - } - if (statsCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.automl.v1beta1.StringStats) stats_); - } - if (statsCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.automl.v1beta1.TimestampStats) stats_); - } - if (statsCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.automl.v1beta1.ArrayStats) stats_); - } - if (statsCase_ == 7) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 7, (com.google.cloud.automl.v1beta1.StructStats) stats_); - } - if (statsCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, (com.google.cloud.automl.v1beta1.CategoryStats) stats_); - } - if (validValueCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(9, validValueCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DataStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DataStats other = - (com.google.cloud.automl.v1beta1.DataStats) obj; - - if (getDistinctValueCount() != other.getDistinctValueCount()) return false; - if (getNullValueCount() != other.getNullValueCount()) return false; - if (getValidValueCount() != other.getValidValueCount()) return false; - if (!getStatsCase().equals(other.getStatsCase())) return false; - switch (statsCase_) { - case 3: - if (!getFloat64Stats().equals(other.getFloat64Stats())) return false; - break; - case 4: - if (!getStringStats().equals(other.getStringStats())) return false; - break; - case 5: - if (!getTimestampStats().equals(other.getTimestampStats())) return false; - break; - case 6: - if (!getArrayStats().equals(other.getArrayStats())) return false; - break; - case 7: - if (!getStructStats().equals(other.getStructStats())) return false; - break; - case 8: - if (!getCategoryStats().equals(other.getCategoryStats())) 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) + DISTINCT_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDistinctValueCount()); - hash = (37 * hash) + NULL_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNullValueCount()); - hash = (37 * hash) + VALID_VALUE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValidValueCount()); - switch (statsCase_) { - case 3: - hash = (37 * hash) + FLOAT64_STATS_FIELD_NUMBER; - hash = (53 * hash) + getFloat64Stats().hashCode(); - break; - case 4: - hash = (37 * hash) + STRING_STATS_FIELD_NUMBER; - hash = (53 * hash) + getStringStats().hashCode(); - break; - case 5: - hash = (37 * hash) + TIMESTAMP_STATS_FIELD_NUMBER; - hash = (53 * hash) + getTimestampStats().hashCode(); - break; - case 6: - hash = (37 * hash) + ARRAY_STATS_FIELD_NUMBER; - hash = (53 * hash) + getArrayStats().hashCode(); - break; - case 7: - hash = (37 * hash) + STRUCT_STATS_FIELD_NUMBER; - hash = (53 * hash) + getStructStats().hashCode(); - break; - case 8: - hash = (37 * hash) + CATEGORY_STATS_FIELD_NUMBER; - hash = (53 * hash) + getCategoryStats().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DataStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.DataStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data statistics of a series of values that share the same DataType.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DataStats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DataStats) - com.google.cloud.automl.v1beta1.DataStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_DataStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_DataStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DataStats.class, - com.google.cloud.automl.v1beta1.DataStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DataStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - distinctValueCount_ = 0L; - - nullValueCount_ = 0L; - - validValueCount_ = 0L; - - statsCase_ = 0; - stats_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_DataStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataStats build() { - com.google.cloud.automl.v1beta1.DataStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataStats buildPartial() { - com.google.cloud.automl.v1beta1.DataStats result = - new com.google.cloud.automl.v1beta1.DataStats(this); - if (statsCase_ == 3) { - if (float64StatsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = float64StatsBuilder_.build(); - } - } - if (statsCase_ == 4) { - if (stringStatsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = stringStatsBuilder_.build(); - } - } - if (statsCase_ == 5) { - if (timestampStatsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = timestampStatsBuilder_.build(); - } - } - if (statsCase_ == 6) { - if (arrayStatsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = arrayStatsBuilder_.build(); - } - } - if (statsCase_ == 7) { - if (structStatsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = structStatsBuilder_.build(); - } - } - if (statsCase_ == 8) { - if (categoryStatsBuilder_ == null) { - result.stats_ = stats_; - } else { - result.stats_ = categoryStatsBuilder_.build(); - } - } - result.distinctValueCount_ = distinctValueCount_; - result.nullValueCount_ = nullValueCount_; - result.validValueCount_ = validValueCount_; - result.statsCase_ = statsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DataStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.DataStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DataStats other) { - if (other == com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance()) return this; - if (other.getDistinctValueCount() != 0L) { - setDistinctValueCount(other.getDistinctValueCount()); - } - if (other.getNullValueCount() != 0L) { - setNullValueCount(other.getNullValueCount()); - } - if (other.getValidValueCount() != 0L) { - setValidValueCount(other.getValidValueCount()); - } - switch (other.getStatsCase()) { - case FLOAT64_STATS: - { - mergeFloat64Stats(other.getFloat64Stats()); - break; - } - case STRING_STATS: - { - mergeStringStats(other.getStringStats()); - break; - } - case TIMESTAMP_STATS: - { - mergeTimestampStats(other.getTimestampStats()); - break; - } - case ARRAY_STATS: - { - mergeArrayStats(other.getArrayStats()); - break; - } - case STRUCT_STATS: - { - mergeStructStats(other.getStructStats()); - break; - } - case CATEGORY_STATS: - { - mergeCategoryStats(other.getCategoryStats()); - break; - } - case STATS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DataStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.DataStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int statsCase_ = 0; - private java.lang.Object stats_; - - public StatsCase getStatsCase() { - return StatsCase.forNumber(statsCase_); - } - - public Builder clearStats() { - statsCase_ = 0; - stats_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Float64Stats, - com.google.cloud.automl.v1beta1.Float64Stats.Builder, - com.google.cloud.automl.v1beta1.Float64StatsOrBuilder> - float64StatsBuilder_; - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - * - * @return Whether the float64Stats field is set. - */ - public boolean hasFloat64Stats() { - return statsCase_ == 3; - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - * - * @return The float64Stats. - */ - public com.google.cloud.automl.v1beta1.Float64Stats getFloat64Stats() { - if (float64StatsBuilder_ == null) { - if (statsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Float64Stats) stats_; - } - return com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance(); - } else { - if (statsCase_ == 3) { - return float64StatsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - public Builder setFloat64Stats(com.google.cloud.automl.v1beta1.Float64Stats value) { - if (float64StatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stats_ = value; - onChanged(); - } else { - float64StatsBuilder_.setMessage(value); - } - statsCase_ = 3; - return this; - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - public Builder setFloat64Stats( - com.google.cloud.automl.v1beta1.Float64Stats.Builder builderForValue) { - if (float64StatsBuilder_ == null) { - stats_ = builderForValue.build(); - onChanged(); - } else { - float64StatsBuilder_.setMessage(builderForValue.build()); - } - statsCase_ = 3; - return this; - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - public Builder mergeFloat64Stats(com.google.cloud.automl.v1beta1.Float64Stats value) { - if (float64StatsBuilder_ == null) { - if (statsCase_ == 3 - && stats_ != com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance()) { - stats_ = - com.google.cloud.automl.v1beta1.Float64Stats.newBuilder( - (com.google.cloud.automl.v1beta1.Float64Stats) stats_) - .mergeFrom(value) - .buildPartial(); - } else { - stats_ = value; - } - onChanged(); - } else { - if (statsCase_ == 3) { - float64StatsBuilder_.mergeFrom(value); - } - float64StatsBuilder_.setMessage(value); - } - statsCase_ = 3; - return this; - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - public Builder clearFloat64Stats() { - if (float64StatsBuilder_ == null) { - if (statsCase_ == 3) { - statsCase_ = 0; - stats_ = null; - onChanged(); - } - } else { - if (statsCase_ == 3) { - statsCase_ = 0; - stats_ = null; - } - float64StatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - public com.google.cloud.automl.v1beta1.Float64Stats.Builder getFloat64StatsBuilder() { - return getFloat64StatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - public com.google.cloud.automl.v1beta1.Float64StatsOrBuilder getFloat64StatsOrBuilder() { - if ((statsCase_ == 3) && (float64StatsBuilder_ != null)) { - return float64StatsBuilder_.getMessageOrBuilder(); - } else { - if (statsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Float64Stats) stats_; - } - return com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for FLOAT64 DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Float64Stats, - com.google.cloud.automl.v1beta1.Float64Stats.Builder, - com.google.cloud.automl.v1beta1.Float64StatsOrBuilder> - getFloat64StatsFieldBuilder() { - if (float64StatsBuilder_ == null) { - if (!(statsCase_ == 3)) { - stats_ = com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance(); - } - float64StatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Float64Stats, - com.google.cloud.automl.v1beta1.Float64Stats.Builder, - com.google.cloud.automl.v1beta1.Float64StatsOrBuilder>( - (com.google.cloud.automl.v1beta1.Float64Stats) stats_, - getParentForChildren(), - isClean()); - stats_ = null; - } - statsCase_ = 3; - onChanged(); - ; - return float64StatsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StringStats, - com.google.cloud.automl.v1beta1.StringStats.Builder, - com.google.cloud.automl.v1beta1.StringStatsOrBuilder> - stringStatsBuilder_; - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - * - * @return Whether the stringStats field is set. - */ - public boolean hasStringStats() { - return statsCase_ == 4; - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - * - * @return The stringStats. - */ - public com.google.cloud.automl.v1beta1.StringStats getStringStats() { - if (stringStatsBuilder_ == null) { - if (statsCase_ == 4) { - return (com.google.cloud.automl.v1beta1.StringStats) stats_; - } - return com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance(); - } else { - if (statsCase_ == 4) { - return stringStatsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - public Builder setStringStats(com.google.cloud.automl.v1beta1.StringStats value) { - if (stringStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stats_ = value; - onChanged(); - } else { - stringStatsBuilder_.setMessage(value); - } - statsCase_ = 4; - return this; - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - public Builder setStringStats( - com.google.cloud.automl.v1beta1.StringStats.Builder builderForValue) { - if (stringStatsBuilder_ == null) { - stats_ = builderForValue.build(); - onChanged(); - } else { - stringStatsBuilder_.setMessage(builderForValue.build()); - } - statsCase_ = 4; - return this; - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - public Builder mergeStringStats(com.google.cloud.automl.v1beta1.StringStats value) { - if (stringStatsBuilder_ == null) { - if (statsCase_ == 4 - && stats_ != com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance()) { - stats_ = - com.google.cloud.automl.v1beta1.StringStats.newBuilder( - (com.google.cloud.automl.v1beta1.StringStats) stats_) - .mergeFrom(value) - .buildPartial(); - } else { - stats_ = value; - } - onChanged(); - } else { - if (statsCase_ == 4) { - stringStatsBuilder_.mergeFrom(value); - } - stringStatsBuilder_.setMessage(value); - } - statsCase_ = 4; - return this; - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - public Builder clearStringStats() { - if (stringStatsBuilder_ == null) { - if (statsCase_ == 4) { - statsCase_ = 0; - stats_ = null; - onChanged(); - } - } else { - if (statsCase_ == 4) { - statsCase_ = 0; - stats_ = null; - } - stringStatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - public com.google.cloud.automl.v1beta1.StringStats.Builder getStringStatsBuilder() { - return getStringStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - public com.google.cloud.automl.v1beta1.StringStatsOrBuilder getStringStatsOrBuilder() { - if ((statsCase_ == 4) && (stringStatsBuilder_ != null)) { - return stringStatsBuilder_.getMessageOrBuilder(); - } else { - if (statsCase_ == 4) { - return (com.google.cloud.automl.v1beta1.StringStats) stats_; - } - return com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for STRING DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StringStats, - com.google.cloud.automl.v1beta1.StringStats.Builder, - com.google.cloud.automl.v1beta1.StringStatsOrBuilder> - getStringStatsFieldBuilder() { - if (stringStatsBuilder_ == null) { - if (!(statsCase_ == 4)) { - stats_ = com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance(); - } - stringStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StringStats, - com.google.cloud.automl.v1beta1.StringStats.Builder, - com.google.cloud.automl.v1beta1.StringStatsOrBuilder>( - (com.google.cloud.automl.v1beta1.StringStats) stats_, - getParentForChildren(), - isClean()); - stats_ = null; - } - statsCase_ = 4; - onChanged(); - ; - return stringStatsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TimestampStats, - com.google.cloud.automl.v1beta1.TimestampStats.Builder, - com.google.cloud.automl.v1beta1.TimestampStatsOrBuilder> - timestampStatsBuilder_; - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - * - * @return Whether the timestampStats field is set. - */ - public boolean hasTimestampStats() { - return statsCase_ == 5; - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - * - * @return The timestampStats. - */ - public com.google.cloud.automl.v1beta1.TimestampStats getTimestampStats() { - if (timestampStatsBuilder_ == null) { - if (statsCase_ == 5) { - return (com.google.cloud.automl.v1beta1.TimestampStats) stats_; - } - return com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance(); - } else { - if (statsCase_ == 5) { - return timestampStatsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - public Builder setTimestampStats(com.google.cloud.automl.v1beta1.TimestampStats value) { - if (timestampStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stats_ = value; - onChanged(); - } else { - timestampStatsBuilder_.setMessage(value); - } - statsCase_ = 5; - return this; - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - public Builder setTimestampStats( - com.google.cloud.automl.v1beta1.TimestampStats.Builder builderForValue) { - if (timestampStatsBuilder_ == null) { - stats_ = builderForValue.build(); - onChanged(); - } else { - timestampStatsBuilder_.setMessage(builderForValue.build()); - } - statsCase_ = 5; - return this; - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - public Builder mergeTimestampStats(com.google.cloud.automl.v1beta1.TimestampStats value) { - if (timestampStatsBuilder_ == null) { - if (statsCase_ == 5 - && stats_ != com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance()) { - stats_ = - com.google.cloud.automl.v1beta1.TimestampStats.newBuilder( - (com.google.cloud.automl.v1beta1.TimestampStats) stats_) - .mergeFrom(value) - .buildPartial(); - } else { - stats_ = value; - } - onChanged(); - } else { - if (statsCase_ == 5) { - timestampStatsBuilder_.mergeFrom(value); - } - timestampStatsBuilder_.setMessage(value); - } - statsCase_ = 5; - return this; - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - public Builder clearTimestampStats() { - if (timestampStatsBuilder_ == null) { - if (statsCase_ == 5) { - statsCase_ = 0; - stats_ = null; - onChanged(); - } - } else { - if (statsCase_ == 5) { - statsCase_ = 0; - stats_ = null; - } - timestampStatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - public com.google.cloud.automl.v1beta1.TimestampStats.Builder getTimestampStatsBuilder() { - return getTimestampStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - public com.google.cloud.automl.v1beta1.TimestampStatsOrBuilder getTimestampStatsOrBuilder() { - if ((statsCase_ == 5) && (timestampStatsBuilder_ != null)) { - return timestampStatsBuilder_.getMessageOrBuilder(); - } else { - if (statsCase_ == 5) { - return (com.google.cloud.automl.v1beta1.TimestampStats) stats_; - } - return com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for TIMESTAMP DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TimestampStats, - com.google.cloud.automl.v1beta1.TimestampStats.Builder, - com.google.cloud.automl.v1beta1.TimestampStatsOrBuilder> - getTimestampStatsFieldBuilder() { - if (timestampStatsBuilder_ == null) { - if (!(statsCase_ == 5)) { - stats_ = com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance(); - } - timestampStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TimestampStats, - com.google.cloud.automl.v1beta1.TimestampStats.Builder, - com.google.cloud.automl.v1beta1.TimestampStatsOrBuilder>( - (com.google.cloud.automl.v1beta1.TimestampStats) stats_, - getParentForChildren(), - isClean()); - stats_ = null; - } - statsCase_ = 5; - onChanged(); - ; - return timestampStatsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ArrayStats, - com.google.cloud.automl.v1beta1.ArrayStats.Builder, - com.google.cloud.automl.v1beta1.ArrayStatsOrBuilder> - arrayStatsBuilder_; - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - * - * @return Whether the arrayStats field is set. - */ - public boolean hasArrayStats() { - return statsCase_ == 6; - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - * - * @return The arrayStats. - */ - public com.google.cloud.automl.v1beta1.ArrayStats getArrayStats() { - if (arrayStatsBuilder_ == null) { - if (statsCase_ == 6) { - return (com.google.cloud.automl.v1beta1.ArrayStats) stats_; - } - return com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance(); - } else { - if (statsCase_ == 6) { - return arrayStatsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - public Builder setArrayStats(com.google.cloud.automl.v1beta1.ArrayStats value) { - if (arrayStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stats_ = value; - onChanged(); - } else { - arrayStatsBuilder_.setMessage(value); - } - statsCase_ = 6; - return this; - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - public Builder setArrayStats( - com.google.cloud.automl.v1beta1.ArrayStats.Builder builderForValue) { - if (arrayStatsBuilder_ == null) { - stats_ = builderForValue.build(); - onChanged(); - } else { - arrayStatsBuilder_.setMessage(builderForValue.build()); - } - statsCase_ = 6; - return this; - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - public Builder mergeArrayStats(com.google.cloud.automl.v1beta1.ArrayStats value) { - if (arrayStatsBuilder_ == null) { - if (statsCase_ == 6 - && stats_ != com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance()) { - stats_ = - com.google.cloud.automl.v1beta1.ArrayStats.newBuilder( - (com.google.cloud.automl.v1beta1.ArrayStats) stats_) - .mergeFrom(value) - .buildPartial(); - } else { - stats_ = value; - } - onChanged(); - } else { - if (statsCase_ == 6) { - arrayStatsBuilder_.mergeFrom(value); - } - arrayStatsBuilder_.setMessage(value); - } - statsCase_ = 6; - return this; - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - public Builder clearArrayStats() { - if (arrayStatsBuilder_ == null) { - if (statsCase_ == 6) { - statsCase_ = 0; - stats_ = null; - onChanged(); - } - } else { - if (statsCase_ == 6) { - statsCase_ = 0; - stats_ = null; - } - arrayStatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - public com.google.cloud.automl.v1beta1.ArrayStats.Builder getArrayStatsBuilder() { - return getArrayStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - public com.google.cloud.automl.v1beta1.ArrayStatsOrBuilder getArrayStatsOrBuilder() { - if ((statsCase_ == 6) && (arrayStatsBuilder_ != null)) { - return arrayStatsBuilder_.getMessageOrBuilder(); - } else { - if (statsCase_ == 6) { - return (com.google.cloud.automl.v1beta1.ArrayStats) stats_; - } - return com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for ARRAY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ArrayStats, - com.google.cloud.automl.v1beta1.ArrayStats.Builder, - com.google.cloud.automl.v1beta1.ArrayStatsOrBuilder> - getArrayStatsFieldBuilder() { - if (arrayStatsBuilder_ == null) { - if (!(statsCase_ == 6)) { - stats_ = com.google.cloud.automl.v1beta1.ArrayStats.getDefaultInstance(); - } - arrayStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ArrayStats, - com.google.cloud.automl.v1beta1.ArrayStats.Builder, - com.google.cloud.automl.v1beta1.ArrayStatsOrBuilder>( - (com.google.cloud.automl.v1beta1.ArrayStats) stats_, - getParentForChildren(), - isClean()); - stats_ = null; - } - statsCase_ = 6; - onChanged(); - ; - return arrayStatsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StructStats, - com.google.cloud.automl.v1beta1.StructStats.Builder, - com.google.cloud.automl.v1beta1.StructStatsOrBuilder> - structStatsBuilder_; - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - * - * @return Whether the structStats field is set. - */ - public boolean hasStructStats() { - return statsCase_ == 7; - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - * - * @return The structStats. - */ - public com.google.cloud.automl.v1beta1.StructStats getStructStats() { - if (structStatsBuilder_ == null) { - if (statsCase_ == 7) { - return (com.google.cloud.automl.v1beta1.StructStats) stats_; - } - return com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance(); - } else { - if (statsCase_ == 7) { - return structStatsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - public Builder setStructStats(com.google.cloud.automl.v1beta1.StructStats value) { - if (structStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stats_ = value; - onChanged(); - } else { - structStatsBuilder_.setMessage(value); - } - statsCase_ = 7; - return this; - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - public Builder setStructStats( - com.google.cloud.automl.v1beta1.StructStats.Builder builderForValue) { - if (structStatsBuilder_ == null) { - stats_ = builderForValue.build(); - onChanged(); - } else { - structStatsBuilder_.setMessage(builderForValue.build()); - } - statsCase_ = 7; - return this; - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - public Builder mergeStructStats(com.google.cloud.automl.v1beta1.StructStats value) { - if (structStatsBuilder_ == null) { - if (statsCase_ == 7 - && stats_ != com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance()) { - stats_ = - com.google.cloud.automl.v1beta1.StructStats.newBuilder( - (com.google.cloud.automl.v1beta1.StructStats) stats_) - .mergeFrom(value) - .buildPartial(); - } else { - stats_ = value; - } - onChanged(); - } else { - if (statsCase_ == 7) { - structStatsBuilder_.mergeFrom(value); - } - structStatsBuilder_.setMessage(value); - } - statsCase_ = 7; - return this; - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - public Builder clearStructStats() { - if (structStatsBuilder_ == null) { - if (statsCase_ == 7) { - statsCase_ = 0; - stats_ = null; - onChanged(); - } - } else { - if (statsCase_ == 7) { - statsCase_ = 0; - stats_ = null; - } - structStatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - public com.google.cloud.automl.v1beta1.StructStats.Builder getStructStatsBuilder() { - return getStructStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - public com.google.cloud.automl.v1beta1.StructStatsOrBuilder getStructStatsOrBuilder() { - if ((statsCase_ == 7) && (structStatsBuilder_ != null)) { - return structStatsBuilder_.getMessageOrBuilder(); - } else { - if (statsCase_ == 7) { - return (com.google.cloud.automl.v1beta1.StructStats) stats_; - } - return com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for STRUCT DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StructStats, - com.google.cloud.automl.v1beta1.StructStats.Builder, - com.google.cloud.automl.v1beta1.StructStatsOrBuilder> - getStructStatsFieldBuilder() { - if (structStatsBuilder_ == null) { - if (!(statsCase_ == 7)) { - stats_ = com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance(); - } - structStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StructStats, - com.google.cloud.automl.v1beta1.StructStats.Builder, - com.google.cloud.automl.v1beta1.StructStatsOrBuilder>( - (com.google.cloud.automl.v1beta1.StructStats) stats_, - getParentForChildren(), - isClean()); - stats_ = null; - } - statsCase_ = 7; - onChanged(); - ; - return structStatsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CategoryStats, - com.google.cloud.automl.v1beta1.CategoryStats.Builder, - com.google.cloud.automl.v1beta1.CategoryStatsOrBuilder> - categoryStatsBuilder_; - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - * - * @return Whether the categoryStats field is set. - */ - public boolean hasCategoryStats() { - return statsCase_ == 8; - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - * - * @return The categoryStats. - */ - public com.google.cloud.automl.v1beta1.CategoryStats getCategoryStats() { - if (categoryStatsBuilder_ == null) { - if (statsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.CategoryStats) stats_; - } - return com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance(); - } else { - if (statsCase_ == 8) { - return categoryStatsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - public Builder setCategoryStats(com.google.cloud.automl.v1beta1.CategoryStats value) { - if (categoryStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stats_ = value; - onChanged(); - } else { - categoryStatsBuilder_.setMessage(value); - } - statsCase_ = 8; - return this; - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - public Builder setCategoryStats( - com.google.cloud.automl.v1beta1.CategoryStats.Builder builderForValue) { - if (categoryStatsBuilder_ == null) { - stats_ = builderForValue.build(); - onChanged(); - } else { - categoryStatsBuilder_.setMessage(builderForValue.build()); - } - statsCase_ = 8; - return this; - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - public Builder mergeCategoryStats(com.google.cloud.automl.v1beta1.CategoryStats value) { - if (categoryStatsBuilder_ == null) { - if (statsCase_ == 8 - && stats_ != com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance()) { - stats_ = - com.google.cloud.automl.v1beta1.CategoryStats.newBuilder( - (com.google.cloud.automl.v1beta1.CategoryStats) stats_) - .mergeFrom(value) - .buildPartial(); - } else { - stats_ = value; - } - onChanged(); - } else { - if (statsCase_ == 8) { - categoryStatsBuilder_.mergeFrom(value); - } - categoryStatsBuilder_.setMessage(value); - } - statsCase_ = 8; - return this; - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - public Builder clearCategoryStats() { - if (categoryStatsBuilder_ == null) { - if (statsCase_ == 8) { - statsCase_ = 0; - stats_ = null; - onChanged(); - } - } else { - if (statsCase_ == 8) { - statsCase_ = 0; - stats_ = null; - } - categoryStatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - public com.google.cloud.automl.v1beta1.CategoryStats.Builder getCategoryStatsBuilder() { - return getCategoryStatsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - public com.google.cloud.automl.v1beta1.CategoryStatsOrBuilder getCategoryStatsOrBuilder() { - if ((statsCase_ == 8) && (categoryStatsBuilder_ != null)) { - return categoryStatsBuilder_.getMessageOrBuilder(); - } else { - if (statsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.CategoryStats) stats_; - } - return com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance(); - } - } - /** - * - * - *
-     * The statistics for CATEGORY DataType.
-     * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CategoryStats, - com.google.cloud.automl.v1beta1.CategoryStats.Builder, - com.google.cloud.automl.v1beta1.CategoryStatsOrBuilder> - getCategoryStatsFieldBuilder() { - if (categoryStatsBuilder_ == null) { - if (!(statsCase_ == 8)) { - stats_ = com.google.cloud.automl.v1beta1.CategoryStats.getDefaultInstance(); - } - categoryStatsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CategoryStats, - com.google.cloud.automl.v1beta1.CategoryStats.Builder, - com.google.cloud.automl.v1beta1.CategoryStatsOrBuilder>( - (com.google.cloud.automl.v1beta1.CategoryStats) stats_, - getParentForChildren(), - isClean()); - stats_ = null; - } - statsCase_ = 8; - onChanged(); - ; - return categoryStatsBuilder_; - } - - private long distinctValueCount_; - /** - * - * - *
-     * The number of distinct values.
-     * 
- * - * int64 distinct_value_count = 1; - * - * @return The distinctValueCount. - */ - public long getDistinctValueCount() { - return distinctValueCount_; - } - /** - * - * - *
-     * The number of distinct values.
-     * 
- * - * int64 distinct_value_count = 1; - * - * @param value The distinctValueCount to set. - * @return This builder for chaining. - */ - public Builder setDistinctValueCount(long value) { - - distinctValueCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The number of distinct values.
-     * 
- * - * int64 distinct_value_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearDistinctValueCount() { - - distinctValueCount_ = 0L; - onChanged(); - return this; - } - - private long nullValueCount_; - /** - * - * - *
-     * The number of values that are null.
-     * 
- * - * int64 null_value_count = 2; - * - * @return The nullValueCount. - */ - public long getNullValueCount() { - return nullValueCount_; - } - /** - * - * - *
-     * The number of values that are null.
-     * 
- * - * int64 null_value_count = 2; - * - * @param value The nullValueCount to set. - * @return This builder for chaining. - */ - public Builder setNullValueCount(long value) { - - nullValueCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The number of values that are null.
-     * 
- * - * int64 null_value_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearNullValueCount() { - - nullValueCount_ = 0L; - onChanged(); - return this; - } - - private long validValueCount_; - /** - * - * - *
-     * The number of values that are valid.
-     * 
- * - * int64 valid_value_count = 9; - * - * @return The validValueCount. - */ - public long getValidValueCount() { - return validValueCount_; - } - /** - * - * - *
-     * The number of values that are valid.
-     * 
- * - * int64 valid_value_count = 9; - * - * @param value The validValueCount to set. - * @return This builder for chaining. - */ - public Builder setValidValueCount(long value) { - - validValueCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The number of values that are valid.
-     * 
- * - * int64 valid_value_count = 9; - * - * @return This builder for chaining. - */ - public Builder clearValidValueCount() { - - validValueCount_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.DataStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DataStats) - private static final com.google.cloud.automl.v1beta1.DataStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DataStats(); - } - - public static com.google.cloud.automl.v1beta1.DataStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOrBuilder.java deleted file mode 100644 index 4543eea5b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOrBuilder.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface DataStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DataStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The statistics for FLOAT64 DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - * - * @return Whether the float64Stats field is set. - */ - boolean hasFloat64Stats(); - /** - * - * - *
-   * The statistics for FLOAT64 DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - * - * @return The float64Stats. - */ - com.google.cloud.automl.v1beta1.Float64Stats getFloat64Stats(); - /** - * - * - *
-   * The statistics for FLOAT64 DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.Float64Stats float64_stats = 3; - */ - com.google.cloud.automl.v1beta1.Float64StatsOrBuilder getFloat64StatsOrBuilder(); - - /** - * - * - *
-   * The statistics for STRING DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - * - * @return Whether the stringStats field is set. - */ - boolean hasStringStats(); - /** - * - * - *
-   * The statistics for STRING DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - * - * @return The stringStats. - */ - com.google.cloud.automl.v1beta1.StringStats getStringStats(); - /** - * - * - *
-   * The statistics for STRING DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StringStats string_stats = 4; - */ - com.google.cloud.automl.v1beta1.StringStatsOrBuilder getStringStatsOrBuilder(); - - /** - * - * - *
-   * The statistics for TIMESTAMP DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - * - * @return Whether the timestampStats field is set. - */ - boolean hasTimestampStats(); - /** - * - * - *
-   * The statistics for TIMESTAMP DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - * - * @return The timestampStats. - */ - com.google.cloud.automl.v1beta1.TimestampStats getTimestampStats(); - /** - * - * - *
-   * The statistics for TIMESTAMP DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.TimestampStats timestamp_stats = 5; - */ - com.google.cloud.automl.v1beta1.TimestampStatsOrBuilder getTimestampStatsOrBuilder(); - - /** - * - * - *
-   * The statistics for ARRAY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - * - * @return Whether the arrayStats field is set. - */ - boolean hasArrayStats(); - /** - * - * - *
-   * The statistics for ARRAY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - * - * @return The arrayStats. - */ - com.google.cloud.automl.v1beta1.ArrayStats getArrayStats(); - /** - * - * - *
-   * The statistics for ARRAY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.ArrayStats array_stats = 6; - */ - com.google.cloud.automl.v1beta1.ArrayStatsOrBuilder getArrayStatsOrBuilder(); - - /** - * - * - *
-   * The statistics for STRUCT DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - * - * @return Whether the structStats field is set. - */ - boolean hasStructStats(); - /** - * - * - *
-   * The statistics for STRUCT DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - * - * @return The structStats. - */ - com.google.cloud.automl.v1beta1.StructStats getStructStats(); - /** - * - * - *
-   * The statistics for STRUCT DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.StructStats struct_stats = 7; - */ - com.google.cloud.automl.v1beta1.StructStatsOrBuilder getStructStatsOrBuilder(); - - /** - * - * - *
-   * The statistics for CATEGORY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - * - * @return Whether the categoryStats field is set. - */ - boolean hasCategoryStats(); - /** - * - * - *
-   * The statistics for CATEGORY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - * - * @return The categoryStats. - */ - com.google.cloud.automl.v1beta1.CategoryStats getCategoryStats(); - /** - * - * - *
-   * The statistics for CATEGORY DataType.
-   * 
- * - * .google.cloud.automl.v1beta1.CategoryStats category_stats = 8; - */ - com.google.cloud.automl.v1beta1.CategoryStatsOrBuilder getCategoryStatsOrBuilder(); - - /** - * - * - *
-   * The number of distinct values.
-   * 
- * - * int64 distinct_value_count = 1; - * - * @return The distinctValueCount. - */ - long getDistinctValueCount(); - - /** - * - * - *
-   * The number of values that are null.
-   * 
- * - * int64 null_value_count = 2; - * - * @return The nullValueCount. - */ - long getNullValueCount(); - - /** - * - * - *
-   * The number of values that are valid.
-   * 
- * - * int64 valid_value_count = 9; - * - * @return The validValueCount. - */ - long getValidValueCount(); - - public com.google.cloud.automl.v1beta1.DataStats.StatsCase getStatsCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOuterClass.java deleted file mode 100644 index c5c3fd490..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataStatsOuterClass.java +++ /dev/null @@ -1,297 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public final class DataStatsOuterClass { - private DataStatsOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DataStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DataStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Float64Stats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_StringStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_StringStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TimestampStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_BucketsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_BucketsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStatsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStatsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ArrayStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ArrayStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_StructStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_StructStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_StructStats_FieldStatsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_StructStats_FieldStatsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_CategoryStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_CategoryStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_CorrelationStats_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_CorrelationStats_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/automl/v1beta1/data_stats" - + ".proto\022\033google.cloud.automl.v1beta1\032\034goo" - + "gle/api/annotations.proto\"\375\003\n\tDataStats\022" - + "B\n\rfloat64_stats\030\003 \001(\0132).google.cloud.au" - + "toml.v1beta1.Float64StatsH\000\022@\n\014string_st" - + "ats\030\004 \001(\0132(.google.cloud.automl.v1beta1." - + "StringStatsH\000\022F\n\017timestamp_stats\030\005 \001(\0132+" - + ".google.cloud.automl.v1beta1.TimestampSt" - + "atsH\000\022>\n\013array_stats\030\006 \001(\0132\'.google.clou" - + "d.automl.v1beta1.ArrayStatsH\000\022@\n\014struct_" - + "stats\030\007 \001(\0132(.google.cloud.automl.v1beta" - + "1.StructStatsH\000\022D\n\016category_stats\030\010 \001(\0132" - + "*.google.cloud.automl.v1beta1.CategorySt" - + "atsH\000\022\034\n\024distinct_value_count\030\001 \001(\003\022\030\n\020n" - + "ull_value_count\030\002 \001(\003\022\031\n\021valid_value_cou" - + "nt\030\t \001(\003B\007\n\005stats\"\335\001\n\014Float64Stats\022\014\n\004me" - + "an\030\001 \001(\001\022\032\n\022standard_deviation\030\002 \001(\001\022\021\n\t" - + "quantiles\030\003 \003(\001\022T\n\021histogram_buckets\030\004 \003" - + "(\01329.google.cloud.automl.v1beta1.Float64" - + "Stats.HistogramBucket\032:\n\017HistogramBucket" - + "\022\013\n\003min\030\001 \001(\001\022\013\n\003max\030\002 \001(\001\022\r\n\005count\030\003 \001(" - + "\003\"\215\001\n\013StringStats\022P\n\021top_unigram_stats\030\001" - + " \003(\01325.google.cloud.automl.v1beta1.Strin" - + "gStats.UnigramStats\032,\n\014UnigramStats\022\r\n\005v" - + "alue\030\001 \001(\t\022\r\n\005count\030\002 \001(\003\"\364\002\n\016TimestampS" - + "tats\022V\n\016granular_stats\030\001 \003(\0132>.google.cl" - + "oud.automl.v1beta1.TimestampStats.Granul" - + "arStatsEntry\032\230\001\n\rGranularStats\022W\n\007bucket" - + "s\030\001 \003(\0132F.google.cloud.automl.v1beta1.Ti" - + "mestampStats.GranularStats.BucketsEntry\032" - + ".\n\014BucketsEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 " - + "\001(\003:\0028\001\032o\n\022GranularStatsEntry\022\013\n\003key\030\001 \001" - + "(\t\022H\n\005value\030\002 \001(\01329.google.cloud.automl." - + "v1beta1.TimestampStats.GranularStats:\0028\001" - + "\"J\n\nArrayStats\022<\n\014member_stats\030\002 \001(\0132&.g" - + "oogle.cloud.automl.v1beta1.DataStats\"\267\001\n" - + "\013StructStats\022M\n\013field_stats\030\001 \003(\01328.goog" - + "le.cloud.automl.v1beta1.StructStats.Fiel" - + "dStatsEntry\032Y\n\017FieldStatsEntry\022\013\n\003key\030\001 " - + "\001(\t\0225\n\005value\030\002 \001(\0132&.google.cloud.automl" - + ".v1beta1.DataStats:\0028\001\"\240\001\n\rCategoryStats" - + "\022Z\n\022top_category_stats\030\001 \003(\0132>.google.cl" - + "oud.automl.v1beta1.CategoryStats.SingleC" - + "ategoryStats\0323\n\023SingleCategoryStats\022\r\n\005v" - + "alue\030\001 \001(\t\022\r\n\005count\030\002 \001(\003\"%\n\020Correlation" - + "Stats\022\021\n\tcramers_v\030\001 \001(\001B\245\001\n\037com.google." - + "cloud.automl.v1beta1P\001ZAgoogle.golang.or" - + "g/genproto/googleapis/cloud/automl/v1bet" - + "a1;automl\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352" - + "\002\036Google::Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_DataStats_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_DataStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DataStats_descriptor, - new java.lang.String[] { - "Float64Stats", - "StringStats", - "TimestampStats", - "ArrayStats", - "StructStats", - "CategoryStats", - "DistinctValueCount", - "NullValueCount", - "ValidValueCount", - "Stats", - }); - internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_Float64Stats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor, - new java.lang.String[] { - "Mean", "StandardDeviation", "Quantiles", "HistogramBuckets", - }); - internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor = - internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor, - new java.lang.String[] { - "Min", "Max", "Count", - }); - internal_static_google_cloud_automl_v1beta1_StringStats_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_StringStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_StringStats_descriptor, - new java.lang.String[] { - "TopUnigramStats", - }); - internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_descriptor = - internal_static_google_cloud_automl_v1beta1_StringStats_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_descriptor, - new java.lang.String[] { - "Value", "Count", - }); - internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_TimestampStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor, - new java.lang.String[] { - "GranularStats", - }); - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_descriptor = - internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_descriptor, - new java.lang.String[] { - "Buckets", - }); - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_BucketsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_BucketsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_BucketsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStatsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStatsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStatsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_automl_v1beta1_ArrayStats_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_ArrayStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ArrayStats_descriptor, - new java.lang.String[] { - "MemberStats", - }); - internal_static_google_cloud_automl_v1beta1_StructStats_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_automl_v1beta1_StructStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_StructStats_descriptor, - new java.lang.String[] { - "FieldStats", - }); - internal_static_google_cloud_automl_v1beta1_StructStats_FieldStatsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_StructStats_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_automl_v1beta1_StructStats_FieldStatsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_StructStats_FieldStatsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_automl_v1beta1_CategoryStats_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_automl_v1beta1_CategoryStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_CategoryStats_descriptor, - new java.lang.String[] { - "TopCategoryStats", - }); - internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_descriptor = - internal_static_google_cloud_automl_v1beta1_CategoryStats_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_CategoryStats_SingleCategoryStats_descriptor, - new java.lang.String[] { - "Value", "Count", - }); - internal_static_google_cloud_automl_v1beta1_CorrelationStats_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_automl_v1beta1_CorrelationStats_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_CorrelationStats_descriptor, - new java.lang.String[] { - "CramersV", - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataType.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataType.java deleted file mode 100644 index 046bcdf3b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataType.java +++ /dev/null @@ -1,1666 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_types.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Indicated the type of data that can be stored in a structured data entity
- * (e.g. a table).
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DataType} - */ -public final class DataType extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.DataType) - DataTypeOrBuilder { - private static final long serialVersionUID = 0L; - // Use DataType.newBuilder() to construct. - private DataType(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DataType() { - typeCode_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataType(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DataType( - 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(); - - typeCode_ = rawValue; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.DataType.Builder subBuilder = null; - if (detailsCase_ == 2) { - subBuilder = ((com.google.cloud.automl.v1beta1.DataType) details_).toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DataType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.DataType) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 2; - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.StructType.Builder subBuilder = null; - if (detailsCase_ == 3) { - subBuilder = ((com.google.cloud.automl.v1beta1.StructType) details_).toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.StructType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.StructType) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 3; - break; - } - case 32: - { - nullable_ = input.readBool(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - detailsCase_ = 5; - details_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_DataType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_DataType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DataType.class, - com.google.cloud.automl.v1beta1.DataType.Builder.class); - } - - private int detailsCase_ = 0; - private java.lang.Object details_; - - public enum DetailsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - LIST_ELEMENT_TYPE(2), - STRUCT_TYPE(3), - TIME_FORMAT(5), - DETAILS_NOT_SET(0); - private final int value; - - private DetailsCase(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 DetailsCase valueOf(int value) { - return forNumber(value); - } - - public static DetailsCase forNumber(int value) { - switch (value) { - case 2: - return LIST_ELEMENT_TYPE; - case 3: - return STRUCT_TYPE; - case 5: - return TIME_FORMAT; - case 0: - return DETAILS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DetailsCase getDetailsCase() { - return DetailsCase.forNumber(detailsCase_); - } - - public static final int LIST_ELEMENT_TYPE_FIELD_NUMBER = 2; - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-   * then `list_element_type` is the type of the elements.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - * - * @return Whether the listElementType field is set. - */ - public boolean hasListElementType() { - return detailsCase_ == 2; - } - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-   * then `list_element_type` is the type of the elements.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - * - * @return The listElementType. - */ - public com.google.cloud.automl.v1beta1.DataType getListElementType() { - if (detailsCase_ == 2) { - return (com.google.cloud.automl.v1beta1.DataType) details_; - } - return com.google.cloud.automl.v1beta1.DataType.getDefaultInstance(); - } - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-   * then `list_element_type` is the type of the elements.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - public com.google.cloud.automl.v1beta1.DataTypeOrBuilder getListElementTypeOrBuilder() { - if (detailsCase_ == 2) { - return (com.google.cloud.automl.v1beta1.DataType) details_; - } - return com.google.cloud.automl.v1beta1.DataType.getDefaultInstance(); - } - - public static final int STRUCT_TYPE_FIELD_NUMBER = 3; - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-   * provides type information for the struct's fields.
-   * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - * - * @return Whether the structType field is set. - */ - public boolean hasStructType() { - return detailsCase_ == 3; - } - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-   * provides type information for the struct's fields.
-   * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - * - * @return The structType. - */ - public com.google.cloud.automl.v1beta1.StructType getStructType() { - if (detailsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.StructType) details_; - } - return com.google.cloud.automl.v1beta1.StructType.getDefaultInstance(); - } - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-   * provides type information for the struct's fields.
-   * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - public com.google.cloud.automl.v1beta1.StructTypeOrBuilder getStructTypeOrBuilder() { - if (detailsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.StructType) details_; - } - return com.google.cloud.automl.v1beta1.StructType.getDefaultInstance(); - } - - public static final int TIME_FORMAT_FIELD_NUMBER = 5; - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-   * then `time_format` provides 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 as described on the type_code is used.
-   * 
- * - * string time_format = 5; - * - * @return The timeFormat. - */ - public java.lang.String getTimeFormat() { - java.lang.Object ref = ""; - if (detailsCase_ == 5) { - ref = details_; - } - if (ref instanceof java.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 (detailsCase_ == 5) { - details_ = s; - } - return s; - } - } - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-   * then `time_format` provides 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 as described on the type_code is used.
-   * 
- * - * string time_format = 5; - * - * @return The bytes for timeFormat. - */ - public com.google.protobuf.ByteString getTimeFormatBytes() { - java.lang.Object ref = ""; - if (detailsCase_ == 5) { - ref = details_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (detailsCase_ == 5) { - details_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TYPE_CODE_FIELD_NUMBER = 1; - private int typeCode_; - /** - * - * - *
-   * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-   * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @return The enum numeric value on the wire for typeCode. - */ - public int getTypeCodeValue() { - return typeCode_; - } - /** - * - * - *
-   * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-   * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @return The typeCode. - */ - public com.google.cloud.automl.v1beta1.TypeCode getTypeCode() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.TypeCode result = - com.google.cloud.automl.v1beta1.TypeCode.valueOf(typeCode_); - return result == null ? com.google.cloud.automl.v1beta1.TypeCode.UNRECOGNIZED : result; - } - - public static final int NULLABLE_FIELD_NUMBER = 4; - private boolean nullable_; - /** - * - * - *
-   * If true, this DataType can also be `NULL`. In .CSV files `NULL` value is
-   * expressed as an empty string.
-   * 
- * - * bool nullable = 4; - * - * @return The nullable. - */ - public boolean getNullable() { - return nullable_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (typeCode_ != com.google.cloud.automl.v1beta1.TypeCode.TYPE_CODE_UNSPECIFIED.getNumber()) { - output.writeEnum(1, typeCode_); - } - if (detailsCase_ == 2) { - output.writeMessage(2, (com.google.cloud.automl.v1beta1.DataType) details_); - } - if (detailsCase_ == 3) { - output.writeMessage(3, (com.google.cloud.automl.v1beta1.StructType) details_); - } - if (nullable_ != false) { - output.writeBool(4, nullable_); - } - if (detailsCase_ == 5) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, details_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (typeCode_ != com.google.cloud.automl.v1beta1.TypeCode.TYPE_CODE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, typeCode_); - } - if (detailsCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.automl.v1beta1.DataType) details_); - } - if (detailsCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.automl.v1beta1.StructType) details_); - } - if (nullable_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, nullable_); - } - if (detailsCase_ == 5) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, details_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DataType)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DataType other = (com.google.cloud.automl.v1beta1.DataType) obj; - - if (typeCode_ != other.typeCode_) return false; - if (getNullable() != other.getNullable()) return false; - if (!getDetailsCase().equals(other.getDetailsCase())) return false; - switch (detailsCase_) { - case 2: - if (!getListElementType().equals(other.getListElementType())) return false; - break; - case 3: - if (!getStructType().equals(other.getStructType())) return false; - break; - case 5: - if (!getTimeFormat().equals(other.getTimeFormat())) 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) + TYPE_CODE_FIELD_NUMBER; - hash = (53 * hash) + typeCode_; - hash = (37 * hash) + NULLABLE_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getNullable()); - switch (detailsCase_) { - case 2: - hash = (37 * hash) + LIST_ELEMENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getListElementType().hashCode(); - break; - case 3: - hash = (37 * hash) + STRUCT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getStructType().hashCode(); - break; - case 5: - hash = (37 * hash) + TIME_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getTimeFormat().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataType parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DataType parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DataType parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.DataType prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Indicated the type of data that can be stored in a structured data entity
-   * (e.g. a table).
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DataType} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DataType) - com.google.cloud.automl.v1beta1.DataTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_DataType_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_DataType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DataType.class, - com.google.cloud.automl.v1beta1.DataType.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DataType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - typeCode_ = 0; - - nullable_ = false; - - detailsCase_ = 0; - details_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_DataType_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataType getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DataType.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataType build() { - com.google.cloud.automl.v1beta1.DataType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataType buildPartial() { - com.google.cloud.automl.v1beta1.DataType result = - new com.google.cloud.automl.v1beta1.DataType(this); - if (detailsCase_ == 2) { - if (listElementTypeBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = listElementTypeBuilder_.build(); - } - } - if (detailsCase_ == 3) { - if (structTypeBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = structTypeBuilder_.build(); - } - } - if (detailsCase_ == 5) { - result.details_ = details_; - } - result.typeCode_ = typeCode_; - result.nullable_ = nullable_; - result.detailsCase_ = detailsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DataType) { - return mergeFrom((com.google.cloud.automl.v1beta1.DataType) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DataType other) { - if (other == com.google.cloud.automl.v1beta1.DataType.getDefaultInstance()) return this; - if (other.typeCode_ != 0) { - setTypeCodeValue(other.getTypeCodeValue()); - } - if (other.getNullable() != false) { - setNullable(other.getNullable()); - } - switch (other.getDetailsCase()) { - case LIST_ELEMENT_TYPE: - { - mergeListElementType(other.getListElementType()); - break; - } - case STRUCT_TYPE: - { - mergeStructType(other.getStructType()); - break; - } - case TIME_FORMAT: - { - detailsCase_ = 5; - details_ = other.details_; - onChanged(); - break; - } - case DETAILS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DataType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.DataType) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int detailsCase_ = 0; - private java.lang.Object details_; - - public DetailsCase getDetailsCase() { - return DetailsCase.forNumber(detailsCase_); - } - - public Builder clearDetails() { - detailsCase_ = 0; - details_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataType, - com.google.cloud.automl.v1beta1.DataType.Builder, - com.google.cloud.automl.v1beta1.DataTypeOrBuilder> - listElementTypeBuilder_; - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - * - * @return Whether the listElementType field is set. - */ - public boolean hasListElementType() { - return detailsCase_ == 2; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - * - * @return The listElementType. - */ - public com.google.cloud.automl.v1beta1.DataType getListElementType() { - if (listElementTypeBuilder_ == null) { - if (detailsCase_ == 2) { - return (com.google.cloud.automl.v1beta1.DataType) details_; - } - return com.google.cloud.automl.v1beta1.DataType.getDefaultInstance(); - } else { - if (detailsCase_ == 2) { - return listElementTypeBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.DataType.getDefaultInstance(); - } - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - public Builder setListElementType(com.google.cloud.automl.v1beta1.DataType value) { - if (listElementTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - listElementTypeBuilder_.setMessage(value); - } - detailsCase_ = 2; - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - public Builder setListElementType( - com.google.cloud.automl.v1beta1.DataType.Builder builderForValue) { - if (listElementTypeBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - listElementTypeBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 2; - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - public Builder mergeListElementType(com.google.cloud.automl.v1beta1.DataType value) { - if (listElementTypeBuilder_ == null) { - if (detailsCase_ == 2 - && details_ != com.google.cloud.automl.v1beta1.DataType.getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.DataType.newBuilder( - (com.google.cloud.automl.v1beta1.DataType) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 2) { - listElementTypeBuilder_.mergeFrom(value); - } - listElementTypeBuilder_.setMessage(value); - } - detailsCase_ = 2; - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - public Builder clearListElementType() { - if (listElementTypeBuilder_ == null) { - if (detailsCase_ == 2) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 2) { - detailsCase_ = 0; - details_ = null; - } - listElementTypeBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - public com.google.cloud.automl.v1beta1.DataType.Builder getListElementTypeBuilder() { - return getListElementTypeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - public com.google.cloud.automl.v1beta1.DataTypeOrBuilder getListElementTypeOrBuilder() { - if ((detailsCase_ == 2) && (listElementTypeBuilder_ != null)) { - return listElementTypeBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 2) { - return (com.google.cloud.automl.v1beta1.DataType) details_; - } - return com.google.cloud.automl.v1beta1.DataType.getDefaultInstance(); - } - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-     * then `list_element_type` is the type of the elements.
-     * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataType, - com.google.cloud.automl.v1beta1.DataType.Builder, - com.google.cloud.automl.v1beta1.DataTypeOrBuilder> - getListElementTypeFieldBuilder() { - if (listElementTypeBuilder_ == null) { - if (!(detailsCase_ == 2)) { - details_ = com.google.cloud.automl.v1beta1.DataType.getDefaultInstance(); - } - listElementTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DataType, - com.google.cloud.automl.v1beta1.DataType.Builder, - com.google.cloud.automl.v1beta1.DataTypeOrBuilder>( - (com.google.cloud.automl.v1beta1.DataType) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 2; - onChanged(); - ; - return listElementTypeBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StructType, - com.google.cloud.automl.v1beta1.StructType.Builder, - com.google.cloud.automl.v1beta1.StructTypeOrBuilder> - structTypeBuilder_; - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - * - * @return Whether the structType field is set. - */ - public boolean hasStructType() { - return detailsCase_ == 3; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - * - * @return The structType. - */ - public com.google.cloud.automl.v1beta1.StructType getStructType() { - if (structTypeBuilder_ == null) { - if (detailsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.StructType) details_; - } - return com.google.cloud.automl.v1beta1.StructType.getDefaultInstance(); - } else { - if (detailsCase_ == 3) { - return structTypeBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.StructType.getDefaultInstance(); - } - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - public Builder setStructType(com.google.cloud.automl.v1beta1.StructType value) { - if (structTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - structTypeBuilder_.setMessage(value); - } - detailsCase_ = 3; - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - public Builder setStructType( - com.google.cloud.automl.v1beta1.StructType.Builder builderForValue) { - if (structTypeBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - structTypeBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 3; - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - public Builder mergeStructType(com.google.cloud.automl.v1beta1.StructType value) { - if (structTypeBuilder_ == null) { - if (detailsCase_ == 3 - && details_ != com.google.cloud.automl.v1beta1.StructType.getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.StructType.newBuilder( - (com.google.cloud.automl.v1beta1.StructType) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 3) { - structTypeBuilder_.mergeFrom(value); - } - structTypeBuilder_.setMessage(value); - } - detailsCase_ = 3; - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - public Builder clearStructType() { - if (structTypeBuilder_ == null) { - if (detailsCase_ == 3) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 3) { - detailsCase_ = 0; - details_ = null; - } - structTypeBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - public com.google.cloud.automl.v1beta1.StructType.Builder getStructTypeBuilder() { - return getStructTypeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - public com.google.cloud.automl.v1beta1.StructTypeOrBuilder getStructTypeOrBuilder() { - if ((detailsCase_ == 3) && (structTypeBuilder_ != null)) { - return structTypeBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 3) { - return (com.google.cloud.automl.v1beta1.StructType) details_; - } - return com.google.cloud.automl.v1beta1.StructType.getDefaultInstance(); - } - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-     * provides type information for the struct's fields.
-     * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StructType, - com.google.cloud.automl.v1beta1.StructType.Builder, - com.google.cloud.automl.v1beta1.StructTypeOrBuilder> - getStructTypeFieldBuilder() { - if (structTypeBuilder_ == null) { - if (!(detailsCase_ == 3)) { - details_ = com.google.cloud.automl.v1beta1.StructType.getDefaultInstance(); - } - structTypeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.StructType, - com.google.cloud.automl.v1beta1.StructType.Builder, - com.google.cloud.automl.v1beta1.StructTypeOrBuilder>( - (com.google.cloud.automl.v1beta1.StructType) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 3; - onChanged(); - ; - return structTypeBuilder_; - } - - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-     * then `time_format` provides 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 as described on the type_code is used.
-     * 
- * - * string time_format = 5; - * - * @return The timeFormat. - */ - public java.lang.String getTimeFormat() { - java.lang.Object ref = ""; - if (detailsCase_ == 5) { - ref = details_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (detailsCase_ == 5) { - details_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-     * then `time_format` provides 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 as described on the type_code is used.
-     * 
- * - * string time_format = 5; - * - * @return The bytes for timeFormat. - */ - public com.google.protobuf.ByteString getTimeFormatBytes() { - java.lang.Object ref = ""; - if (detailsCase_ == 5) { - ref = details_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (detailsCase_ == 5) { - details_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-     * then `time_format` provides 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 as described on the type_code is used.
-     * 
- * - * string time_format = 5; - * - * @param value The timeFormat to set. - * @return This builder for chaining. - */ - public Builder setTimeFormat(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - detailsCase_ = 5; - details_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-     * then `time_format` provides 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 as described on the type_code is used.
-     * 
- * - * string time_format = 5; - * - * @return This builder for chaining. - */ - public Builder clearTimeFormat() { - if (detailsCase_ == 5) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-     * then `time_format` provides 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 as described on the type_code is used.
-     * 
- * - * string time_format = 5; - * - * @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); - detailsCase_ = 5; - details_ = value; - onChanged(); - return this; - } - - private int typeCode_ = 0; - /** - * - * - *
-     * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-     * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @return The enum numeric value on the wire for typeCode. - */ - public int getTypeCodeValue() { - return typeCode_; - } - /** - * - * - *
-     * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-     * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @param value The enum numeric value on the wire for typeCode to set. - * @return This builder for chaining. - */ - public Builder setTypeCodeValue(int value) { - typeCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-     * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @return The typeCode. - */ - public com.google.cloud.automl.v1beta1.TypeCode getTypeCode() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.TypeCode result = - com.google.cloud.automl.v1beta1.TypeCode.valueOf(typeCode_); - return result == null ? com.google.cloud.automl.v1beta1.TypeCode.UNRECOGNIZED : result; - } - /** - * - * - *
-     * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-     * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @param value The typeCode to set. - * @return This builder for chaining. - */ - public Builder setTypeCode(com.google.cloud.automl.v1beta1.TypeCode value) { - if (value == null) { - throw new NullPointerException(); - } - - typeCode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-     * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @return This builder for chaining. - */ - public Builder clearTypeCode() { - - typeCode_ = 0; - onChanged(); - return this; - } - - private boolean nullable_; - /** - * - * - *
-     * If true, this DataType can also be `NULL`. In .CSV files `NULL` value is
-     * expressed as an empty string.
-     * 
- * - * bool nullable = 4; - * - * @return The nullable. - */ - public boolean getNullable() { - return nullable_; - } - /** - * - * - *
-     * If true, this DataType can also be `NULL`. In .CSV files `NULL` value is
-     * expressed as an empty string.
-     * 
- * - * bool nullable = 4; - * - * @param value The nullable to set. - * @return This builder for chaining. - */ - public Builder setNullable(boolean value) { - - nullable_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * If true, this DataType can also be `NULL`. In .CSV files `NULL` value is
-     * expressed as an empty string.
-     * 
- * - * bool nullable = 4; - * - * @return This builder for chaining. - */ - public Builder clearNullable() { - - nullable_ = 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.automl.v1beta1.DataType) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DataType) - private static final com.google.cloud.automl.v1beta1.DataType DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DataType(); - } - - public static com.google.cloud.automl.v1beta1.DataType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DataType(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DataType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypeOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypeOrBuilder.java deleted file mode 100644 index 22ad50498..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypeOrBuilder.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_types.proto - -package com.google.cloud.automl.v1beta1; - -public interface DataTypeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DataType) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-   * then `list_element_type` is the type of the elements.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - * - * @return Whether the listElementType field is set. - */ - boolean hasListElementType(); - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-   * then `list_element_type` is the type of the elements.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - * - * @return The listElementType. - */ - com.google.cloud.automl.v1beta1.DataType getListElementType(); - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY],
-   * then `list_element_type` is the type of the elements.
-   * 
- * - * .google.cloud.automl.v1beta1.DataType list_element_type = 2; - */ - com.google.cloud.automl.v1beta1.DataTypeOrBuilder getListElementTypeOrBuilder(); - - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-   * provides type information for the struct's fields.
-   * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - * - * @return Whether the structType field is set. - */ - boolean hasStructType(); - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-   * provides type information for the struct's fields.
-   * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - * - * @return The structType. - */ - com.google.cloud.automl.v1beta1.StructType getStructType(); - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type`
-   * provides type information for the struct's fields.
-   * 
- * - * .google.cloud.automl.v1beta1.StructType struct_type = 3; - */ - com.google.cloud.automl.v1beta1.StructTypeOrBuilder getStructTypeOrBuilder(); - - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-   * then `time_format` provides 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 as described on the type_code is used.
-   * 
- * - * string time_format = 5; - * - * @return The timeFormat. - */ - java.lang.String getTimeFormat(); - /** - * - * - *
-   * If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP]
-   * then `time_format` provides 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 as described on the type_code is used.
-   * 
- * - * string time_format = 5; - * - * @return The bytes for timeFormat. - */ - com.google.protobuf.ByteString getTimeFormatBytes(); - - /** - * - * - *
-   * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-   * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @return The enum numeric value on the wire for typeCode. - */ - int getTypeCodeValue(); - /** - * - * - *
-   * Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type.
-   * 
- * - * .google.cloud.automl.v1beta1.TypeCode type_code = 1; - * - * @return The typeCode. - */ - com.google.cloud.automl.v1beta1.TypeCode getTypeCode(); - - /** - * - * - *
-   * If true, this DataType can also be `NULL`. In .CSV files `NULL` value is
-   * expressed as an empty string.
-   * 
- * - * bool nullable = 4; - * - * @return The nullable. - */ - boolean getNullable(); - - public com.google.cloud.automl.v1beta1.DataType.DetailsCase getDetailsCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypes.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypes.java deleted file mode 100644 index bccecd06e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DataTypes.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_types.proto - -package com.google.cloud.automl.v1beta1; - -public final class DataTypes { - private DataTypes() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DataType_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DataType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_StructType_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_StructType_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_StructType_FieldsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_StructType_FieldsEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/automl/v1beta1/data_types" - + ".proto\022\033google.cloud.automl.v1beta1\032\034goo" - + "gle/api/annotations.proto\"\374\001\n\010DataType\022B" - + "\n\021list_element_type\030\002 \001(\0132%.google.cloud" - + ".automl.v1beta1.DataTypeH\000\022>\n\013struct_typ" - + "e\030\003 \001(\0132\'.google.cloud.automl.v1beta1.St" - + "ructTypeH\000\022\025\n\013time_format\030\005 \001(\tH\000\0228\n\ttyp" - + "e_code\030\001 \001(\0162%.google.cloud.automl.v1bet" - + "a1.TypeCode\022\020\n\010nullable\030\004 \001(\010B\t\n\007details" - + "\"\247\001\n\nStructType\022C\n\006fields\030\001 \003(\01323.google" - + ".cloud.automl.v1beta1.StructType.FieldsE" - + "ntry\032T\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\0224\n\005valu" - + "e\030\002 \001(\0132%.google.cloud.automl.v1beta1.Da" - + "taType:\0028\001*r\n\010TypeCode\022\031\n\025TYPE_CODE_UNSP" - + "ECIFIED\020\000\022\013\n\007FLOAT64\020\003\022\r\n\tTIMESTAMP\020\004\022\n\n" - + "\006STRING\020\006\022\t\n\005ARRAY\020\010\022\n\n\006STRUCT\020\t\022\014\n\010CATE" - + "GORY\020\nB\245\001\n\037com.google.cloud.automl.v1bet" - + "a1P\001ZAgoogle.golang.org/genproto/googlea" - + "pis/cloud/automl/v1beta1;automl\312\002\033Google" - + "\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Cloud::A" - + "utoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_DataType_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_DataType_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DataType_descriptor, - new java.lang.String[] { - "ListElementType", "StructType", "TimeFormat", "TypeCode", "Nullable", "Details", - }); - internal_static_google_cloud_automl_v1beta1_StructType_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_StructType_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_StructType_descriptor, - new java.lang.String[] { - "Fields", - }); - internal_static_google_cloud_automl_v1beta1_StructType_FieldsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_StructType_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_automl_v1beta1_StructType_FieldsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_StructType_FieldsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Dataset.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Dataset.java deleted file mode 100644 index 0891ac3c2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Dataset.java +++ /dev/null @@ -1,4749 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/dataset.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A workspace for solving a single, particular machine learning (ML) problem.
- * A workspace contains examples that may be annotated.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Dataset} - */ -public final class Dataset extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Dataset) - DatasetOrBuilder { - private static final long serialVersionUID = 0L; - // Use Dataset.newBuilder() to construct. - private Dataset(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Dataset() { - name_ = ""; - displayName_ = ""; - description_ = ""; - etag_ = ""; - } - - @java.lang.Override - @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(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 114: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 168: - { - exampleCount_ = input.readInt32(); - break; - } - case 186: - { - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder subBuilder = null; - if (datasetMetadataCase_ == 23) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 23; - break; - } - case 194: - { - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder - subBuilder = null; - if (datasetMetadataCase_ == 24) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 24; - break; - } - case 202: - { - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder subBuilder = - null; - if (datasetMetadataCase_ == 25) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 25; - break; - } - case 210: - { - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder - subBuilder = null; - if (datasetMetadataCase_ == 26) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 26; - break; - } - case 226: - { - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder subBuilder = - null; - if (datasetMetadataCase_ == 28) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 28; - break; - } - case 234: - { - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder - subBuilder = null; - if (datasetMetadataCase_ == 29) { - subBuilder = - ((com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 29; - break; - } - case 242: - { - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder subBuilder = - null; - if (datasetMetadataCase_ == 30) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) - datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) - datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 30; - break; - } - case 250: - { - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder - subBuilder = null; - if (datasetMetadataCase_ == 31) { - subBuilder = - ((com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 31; - break; - } - case 266: - { - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder subBuilder = null; - if (datasetMetadataCase_ == 33) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_) - .toBuilder(); - } - datasetMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_); - datasetMetadata_ = subBuilder.buildPartial(); - } - datasetMetadataCase_ = 33; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DatasetOuterClass - .internal_static_google_cloud_automl_v1beta1_Dataset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DatasetOuterClass - .internal_static_google_cloud_automl_v1beta1_Dataset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Dataset.class, - com.google.cloud.automl.v1beta1.Dataset.Builder.class); - } - - private int datasetMetadataCase_ = 0; - private java.lang.Object datasetMetadata_; - - public enum DatasetMetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TRANSLATION_DATASET_METADATA(23), - IMAGE_CLASSIFICATION_DATASET_METADATA(24), - TEXT_CLASSIFICATION_DATASET_METADATA(25), - IMAGE_OBJECT_DETECTION_DATASET_METADATA(26), - VIDEO_CLASSIFICATION_DATASET_METADATA(31), - VIDEO_OBJECT_TRACKING_DATASET_METADATA(29), - TEXT_EXTRACTION_DATASET_METADATA(28), - TEXT_SENTIMENT_DATASET_METADATA(30), - TABLES_DATASET_METADATA(33), - DATASETMETADATA_NOT_SET(0); - private final int value; - - private DatasetMetadataCase(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 DatasetMetadataCase valueOf(int value) { - return forNumber(value); - } - - public static DatasetMetadataCase forNumber(int value) { - switch (value) { - case 23: - return TRANSLATION_DATASET_METADATA; - case 24: - return IMAGE_CLASSIFICATION_DATASET_METADATA; - case 25: - return TEXT_CLASSIFICATION_DATASET_METADATA; - case 26: - return IMAGE_OBJECT_DETECTION_DATASET_METADATA; - case 31: - return VIDEO_CLASSIFICATION_DATASET_METADATA; - case 29: - return VIDEO_OBJECT_TRACKING_DATASET_METADATA; - case 28: - return TEXT_EXTRACTION_DATASET_METADATA; - case 30: - return TEXT_SENTIMENT_DATASET_METADATA; - case 33: - return TABLES_DATASET_METADATA; - case 0: - return DATASETMETADATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DatasetMetadataCase getDatasetMetadataCase() { - return DatasetMetadataCase.forNumber(datasetMetadataCase_); - } - - public static final int TRANSLATION_DATASET_METADATA_FIELD_NUMBER = 23; - /** - * - * - *
-   * Metadata for a dataset used for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - * - * @return Whether the translationDatasetMetadata field is set. - */ - public boolean hasTranslationDatasetMetadata() { - return datasetMetadataCase_ == 23; - } - /** - * - * - *
-   * Metadata for a dataset used for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - * - * @return The translationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadata - getTranslationDatasetMetadata() { - if (datasetMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadataOrBuilder - getTranslationDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance(); - } - - public static final int IMAGE_CLASSIFICATION_DATASET_METADATA_FIELD_NUMBER = 24; - /** - * - * - *
-   * Metadata for a dataset used for image classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - * - * @return Whether the imageClassificationDatasetMetadata field is set. - */ - public boolean hasImageClassificationDatasetMetadata() { - return datasetMetadataCase_ == 24; - } - /** - * - * - *
-   * Metadata for a dataset used for image classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - * - * @return The imageClassificationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - getImageClassificationDatasetMetadata() { - if (datasetMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for image classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataOrBuilder - getImageClassificationDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.getDefaultInstance(); - } - - public static final int TEXT_CLASSIFICATION_DATASET_METADATA_FIELD_NUMBER = 25; - /** - * - * - *
-   * Metadata for a dataset used for text classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - * - * @return Whether the textClassificationDatasetMetadata field is set. - */ - public boolean hasTextClassificationDatasetMetadata() { - return datasetMetadataCase_ == 25; - } - /** - * - * - *
-   * Metadata for a dataset used for text classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - * - * @return The textClassificationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - getTextClassificationDatasetMetadata() { - if (datasetMetadataCase_ == 25) { - return (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for text classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataOrBuilder - getTextClassificationDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 25) { - return (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.getDefaultInstance(); - } - - public static final int IMAGE_OBJECT_DETECTION_DATASET_METADATA_FIELD_NUMBER = 26; - /** - * - * - *
-   * Metadata for a dataset used for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - * - * @return Whether the imageObjectDetectionDatasetMetadata field is set. - */ - public boolean hasImageObjectDetectionDatasetMetadata() { - return datasetMetadataCase_ == 26; - } - /** - * - * - *
-   * Metadata for a dataset used for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - * - * @return The imageObjectDetectionDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - getImageObjectDetectionDatasetMetadata() { - if (datasetMetadataCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataOrBuilder - getImageObjectDetectionDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.getDefaultInstance(); - } - - public static final int VIDEO_CLASSIFICATION_DATASET_METADATA_FIELD_NUMBER = 31; - /** - * - * - *
-   * Metadata for a dataset used for video classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - * - * @return Whether the videoClassificationDatasetMetadata field is set. - */ - public boolean hasVideoClassificationDatasetMetadata() { - return datasetMetadataCase_ == 31; - } - /** - * - * - *
-   * Metadata for a dataset used for video classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - * - * @return The videoClassificationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - getVideoClassificationDatasetMetadata() { - if (datasetMetadataCase_ == 31) { - return (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for video classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataOrBuilder - getVideoClassificationDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 31) { - return (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.getDefaultInstance(); - } - - public static final int VIDEO_OBJECT_TRACKING_DATASET_METADATA_FIELD_NUMBER = 29; - /** - * - * - *
-   * Metadata for a dataset used for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - * - * @return Whether the videoObjectTrackingDatasetMetadata field is set. - */ - public boolean hasVideoObjectTrackingDatasetMetadata() { - return datasetMetadataCase_ == 29; - } - /** - * - * - *
-   * Metadata for a dataset used for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - * - * @return The videoObjectTrackingDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - getVideoObjectTrackingDatasetMetadata() { - if (datasetMetadataCase_ == 29) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataOrBuilder - getVideoObjectTrackingDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 29) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.getDefaultInstance(); - } - - public static final int TEXT_EXTRACTION_DATASET_METADATA_FIELD_NUMBER = 28; - /** - * - * - *
-   * Metadata for a dataset used for text extraction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - * - * @return Whether the textExtractionDatasetMetadata field is set. - */ - public boolean hasTextExtractionDatasetMetadata() { - return datasetMetadataCase_ == 28; - } - /** - * - * - *
-   * Metadata for a dataset used for text extraction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - * - * @return The textExtractionDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata - getTextExtractionDatasetMetadata() { - if (datasetMetadataCase_ == 28) { - return (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for text extraction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataOrBuilder - getTextExtractionDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 28) { - return (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance(); - } - - public static final int TEXT_SENTIMENT_DATASET_METADATA_FIELD_NUMBER = 30; - /** - * - * - *
-   * Metadata for a dataset used for text sentiment.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - * - * @return Whether the textSentimentDatasetMetadata field is set. - */ - public boolean hasTextSentimentDatasetMetadata() { - return datasetMetadataCase_ == 30; - } - /** - * - * - *
-   * Metadata for a dataset used for text sentiment.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - * - * @return The textSentimentDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata - getTextSentimentDatasetMetadata() { - if (datasetMetadataCase_ == 30) { - return (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for text sentiment.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataOrBuilder - getTextSentimentDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 30) { - return (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.getDefaultInstance(); - } - - public static final int TABLES_DATASET_METADATA_FIELD_NUMBER = 33; - /** - * - * - *
-   * Metadata for a dataset used for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - * - * @return Whether the tablesDatasetMetadata field is set. - */ - public boolean hasTablesDatasetMetadata() { - return datasetMetadataCase_ == 33; - } - /** - * - * - *
-   * Metadata for a dataset used for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - * - * @return The tablesDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TablesDatasetMetadata getTablesDatasetMetadata() { - if (datasetMetadataCase_ == 33) { - return (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for a dataset used for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - public com.google.cloud.automl.v1beta1.TablesDatasetMetadataOrBuilder - getTablesDatasetMetadataOrBuilder() { - if (datasetMetadataCase_ == 33) { - return (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The resource name of the dataset.
-   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The resource name of the dataset.
-   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Required. The name of the dataset to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9.
-   * 
- * - * string display_name = 2; - * - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the dataset to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9.
-   * 
- * - * string display_name = 2; - * - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * - * - *
-   * User-provided description of the dataset. The description can be up to
-   * 25000 characters long.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * User-provided description of the dataset. The description can be up to
-   * 25000 characters long.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXAMPLE_COUNT_FIELD_NUMBER = 21; - private int exampleCount_; - /** - * - * - *
-   * Output only. The number of examples in the dataset.
-   * 
- * - * int32 example_count = 21; - * - * @return The exampleCount. - */ - public int getExampleCount() { - return exampleCount_; - } - - public static final int CREATE_TIME_FIELD_NUMBER = 14; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. Timestamp when this dataset was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 14; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. Timestamp when this dataset was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 14; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. Timestamp when this dataset was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int ETAG_FIELD_NUMBER = 17; - private volatile java.lang.Object etag_; - /** - * - * - *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
-   * "overwrite" update happens.
-   * 
- * - * string etag = 17; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } - } - /** - * - * - *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
-   * "overwrite" update happens.
-   * 
- * - * string etag = 17; - * - * @return The bytes for etag. - */ - 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 (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - if (createTime_ != null) { - output.writeMessage(14, getCreateTime()); - } - if (!getEtagBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 17, etag_); - } - if (exampleCount_ != 0) { - output.writeInt32(21, exampleCount_); - } - if (datasetMetadataCase_ == 23) { - output.writeMessage( - 23, (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 24) { - output.writeMessage( - 24, - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 25) { - output.writeMessage( - 25, (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 26) { - output.writeMessage( - 26, - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 28) { - output.writeMessage( - 28, (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 29) { - output.writeMessage( - 29, - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 30) { - output.writeMessage( - 30, (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 31) { - output.writeMessage( - 31, - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 33) { - output.writeMessage( - 33, (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCreateTime()); - } - if (!getEtagBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, etag_); - } - if (exampleCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(21, exampleCount_); - } - if (datasetMetadataCase_ == 23) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 23, (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 24) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 24, - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - datasetMetadata_); - } - if (datasetMetadataCase_ == 25) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 25, - (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 26) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 26, - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - datasetMetadata_); - } - if (datasetMetadataCase_ == 28) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 28, (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 29) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 29, - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - datasetMetadata_); - } - if (datasetMetadataCase_ == 30) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 30, (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) datasetMetadata_); - } - if (datasetMetadataCase_ == 31) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 31, - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - datasetMetadata_); - } - if (datasetMetadataCase_ == 33) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 33, (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.Dataset)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Dataset other = (com.google.cloud.automl.v1beta1.Dataset) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (getExampleCount() != other.getExampleCount()) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (!getEtag().equals(other.getEtag())) return false; - if (!getDatasetMetadataCase().equals(other.getDatasetMetadataCase())) return false; - switch (datasetMetadataCase_) { - case 23: - if (!getTranslationDatasetMetadata().equals(other.getTranslationDatasetMetadata())) - return false; - break; - case 24: - if (!getImageClassificationDatasetMetadata() - .equals(other.getImageClassificationDatasetMetadata())) return false; - break; - case 25: - if (!getTextClassificationDatasetMetadata() - .equals(other.getTextClassificationDatasetMetadata())) return false; - break; - case 26: - if (!getImageObjectDetectionDatasetMetadata() - .equals(other.getImageObjectDetectionDatasetMetadata())) return false; - break; - case 31: - if (!getVideoClassificationDatasetMetadata() - .equals(other.getVideoClassificationDatasetMetadata())) return false; - break; - case 29: - if (!getVideoObjectTrackingDatasetMetadata() - .equals(other.getVideoObjectTrackingDatasetMetadata())) return false; - break; - case 28: - if (!getTextExtractionDatasetMetadata().equals(other.getTextExtractionDatasetMetadata())) - return false; - break; - case 30: - if (!getTextSentimentDatasetMetadata().equals(other.getTextSentimentDatasetMetadata())) - return false; - break; - case 33: - if (!getTablesDatasetMetadata().equals(other.getTablesDatasetMetadata())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + EXAMPLE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getExampleCount(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - switch (datasetMetadataCase_) { - case 23: - hash = (37 * hash) + TRANSLATION_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTranslationDatasetMetadata().hashCode(); - break; - case 24: - hash = (37 * hash) + IMAGE_CLASSIFICATION_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getImageClassificationDatasetMetadata().hashCode(); - break; - case 25: - hash = (37 * hash) + TEXT_CLASSIFICATION_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTextClassificationDatasetMetadata().hashCode(); - break; - case 26: - hash = (37 * hash) + IMAGE_OBJECT_DETECTION_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getImageObjectDetectionDatasetMetadata().hashCode(); - break; - case 31: - hash = (37 * hash) + VIDEO_CLASSIFICATION_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getVideoClassificationDatasetMetadata().hashCode(); - break; - case 29: - hash = (37 * hash) + VIDEO_OBJECT_TRACKING_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getVideoObjectTrackingDatasetMetadata().hashCode(); - break; - case 28: - hash = (37 * hash) + TEXT_EXTRACTION_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTextExtractionDatasetMetadata().hashCode(); - break; - case 30: - hash = (37 * hash) + TEXT_SENTIMENT_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTextSentimentDatasetMetadata().hashCode(); - break; - case 33: - hash = (37 * hash) + TABLES_DATASET_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTablesDatasetMetadata().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Dataset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.Dataset prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A workspace for solving a single, particular machine learning (ML) problem.
-   * A workspace contains examples that may be annotated.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Dataset} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Dataset) - com.google.cloud.automl.v1beta1.DatasetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DatasetOuterClass - .internal_static_google_cloud_automl_v1beta1_Dataset_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DatasetOuterClass - .internal_static_google_cloud_automl_v1beta1_Dataset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Dataset.class, - com.google.cloud.automl.v1beta1.Dataset.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Dataset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - description_ = ""; - - exampleCount_ = 0; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - etag_ = ""; - - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DatasetOuterClass - .internal_static_google_cloud_automl_v1beta1_Dataset_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Dataset getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Dataset build() { - com.google.cloud.automl.v1beta1.Dataset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Dataset buildPartial() { - com.google.cloud.automl.v1beta1.Dataset result = - new com.google.cloud.automl.v1beta1.Dataset(this); - if (datasetMetadataCase_ == 23) { - if (translationDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = translationDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 24) { - if (imageClassificationDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = imageClassificationDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 25) { - if (textClassificationDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = textClassificationDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 26) { - if (imageObjectDetectionDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = imageObjectDetectionDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 31) { - if (videoClassificationDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = videoClassificationDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 29) { - if (videoObjectTrackingDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = videoObjectTrackingDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 28) { - if (textExtractionDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = textExtractionDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 30) { - if (textSentimentDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = textSentimentDatasetMetadataBuilder_.build(); - } - } - if (datasetMetadataCase_ == 33) { - if (tablesDatasetMetadataBuilder_ == null) { - result.datasetMetadata_ = datasetMetadata_; - } else { - result.datasetMetadata_ = tablesDatasetMetadataBuilder_.build(); - } - } - result.name_ = name_; - result.displayName_ = displayName_; - result.description_ = description_; - result.exampleCount_ = exampleCount_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.etag_ = etag_; - result.datasetMetadataCase_ = datasetMetadataCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Dataset) { - return mergeFrom((com.google.cloud.automl.v1beta1.Dataset) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Dataset other) { - if (other == com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.getExampleCount() != 0) { - setExampleCount(other.getExampleCount()); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - onChanged(); - } - switch (other.getDatasetMetadataCase()) { - case TRANSLATION_DATASET_METADATA: - { - mergeTranslationDatasetMetadata(other.getTranslationDatasetMetadata()); - break; - } - case IMAGE_CLASSIFICATION_DATASET_METADATA: - { - mergeImageClassificationDatasetMetadata(other.getImageClassificationDatasetMetadata()); - break; - } - case TEXT_CLASSIFICATION_DATASET_METADATA: - { - mergeTextClassificationDatasetMetadata(other.getTextClassificationDatasetMetadata()); - break; - } - case IMAGE_OBJECT_DETECTION_DATASET_METADATA: - { - mergeImageObjectDetectionDatasetMetadata( - other.getImageObjectDetectionDatasetMetadata()); - break; - } - case VIDEO_CLASSIFICATION_DATASET_METADATA: - { - mergeVideoClassificationDatasetMetadata(other.getVideoClassificationDatasetMetadata()); - break; - } - case VIDEO_OBJECT_TRACKING_DATASET_METADATA: - { - mergeVideoObjectTrackingDatasetMetadata(other.getVideoObjectTrackingDatasetMetadata()); - break; - } - case TEXT_EXTRACTION_DATASET_METADATA: - { - mergeTextExtractionDatasetMetadata(other.getTextExtractionDatasetMetadata()); - break; - } - case TEXT_SENTIMENT_DATASET_METADATA: - { - mergeTextSentimentDatasetMetadata(other.getTextSentimentDatasetMetadata()); - break; - } - case TABLES_DATASET_METADATA: - { - mergeTablesDatasetMetadata(other.getTablesDatasetMetadata()); - break; - } - case DATASETMETADATA_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Dataset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.Dataset) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int datasetMetadataCase_ = 0; - private java.lang.Object datasetMetadata_; - - public DatasetMetadataCase getDatasetMetadataCase() { - return DatasetMetadataCase.forNumber(datasetMetadataCase_); - } - - public Builder clearDatasetMetadata() { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadataOrBuilder> - translationDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - * - * @return Whether the translationDatasetMetadata field is set. - */ - public boolean hasTranslationDatasetMetadata() { - return datasetMetadataCase_ == 23; - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - * - * @return The translationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadata - getTranslationDatasetMetadata() { - if (translationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 23) { - return translationDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - public Builder setTranslationDatasetMetadata( - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata value) { - if (translationDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - translationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 23; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - public Builder setTranslationDatasetMetadata( - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder builderForValue) { - if (translationDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - translationDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 23; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - public Builder mergeTranslationDatasetMetadata( - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata value) { - if (translationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 23 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.TranslationDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 23) { - translationDatasetMetadataBuilder_.mergeFrom(value); - } - translationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 23; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - public Builder clearTranslationDatasetMetadata() { - if (translationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 23) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 23) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - translationDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder - getTranslationDatasetMetadataBuilder() { - return getTranslationDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadataOrBuilder - getTranslationDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 23) && (translationDatasetMetadataBuilder_ != null)) { - return translationDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadataOrBuilder> - getTranslationDatasetMetadataFieldBuilder() { - if (translationDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 23)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance(); - } - translationDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 23; - onChanged(); - ; - return translationDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataOrBuilder> - imageClassificationDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - * - * @return Whether the imageClassificationDatasetMetadata field is set. - */ - public boolean hasImageClassificationDatasetMetadata() { - return datasetMetadataCase_ == 24; - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - * - * @return The imageClassificationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - getImageClassificationDatasetMetadata() { - if (imageClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - .getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 24) { - return imageClassificationDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - public Builder setImageClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata value) { - if (imageClassificationDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - imageClassificationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 24; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - public Builder setImageClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder - builderForValue) { - if (imageClassificationDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - imageClassificationDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 24; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - public Builder mergeImageClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata value) { - if (imageClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 24 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 24) { - imageClassificationDatasetMetadataBuilder_.mergeFrom(value); - } - imageClassificationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 24; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - public Builder clearImageClassificationDatasetMetadata() { - if (imageClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 24) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 24) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - imageClassificationDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder - getImageClassificationDatasetMetadataBuilder() { - return getImageClassificationDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataOrBuilder - getImageClassificationDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 24) && (imageClassificationDatasetMetadataBuilder_ != null)) { - return imageClassificationDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for image classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataOrBuilder> - getImageClassificationDatasetMetadataFieldBuilder() { - if (imageClassificationDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 24)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - .getDefaultInstance(); - } - imageClassificationDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 24; - onChanged(); - ; - return imageClassificationDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataOrBuilder> - textClassificationDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - * - * @return Whether the textClassificationDatasetMetadata field is set. - */ - public boolean hasTextClassificationDatasetMetadata() { - return datasetMetadataCase_ == 25; - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - * - * @return The textClassificationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - getTextClassificationDatasetMetadata() { - if (textClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 25) { - return (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - .getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 25) { - return textClassificationDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - public Builder setTextClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata value) { - if (textClassificationDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - textClassificationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 25; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - public Builder setTextClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder builderForValue) { - if (textClassificationDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - textClassificationDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 25; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - public Builder mergeTextClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata value) { - if (textClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 25 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 25) { - textClassificationDatasetMetadataBuilder_.mergeFrom(value); - } - textClassificationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 25; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - public Builder clearTextClassificationDatasetMetadata() { - if (textClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 25) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 25) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - textClassificationDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder - getTextClassificationDatasetMetadataBuilder() { - return getTextClassificationDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataOrBuilder - getTextClassificationDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 25) && (textClassificationDatasetMetadataBuilder_ != null)) { - return textClassificationDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 25) { - return (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for text classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataOrBuilder> - getTextClassificationDatasetMetadataFieldBuilder() { - if (textClassificationDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 25)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - .getDefaultInstance(); - } - textClassificationDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 25; - onChanged(); - ; - return textClassificationDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataOrBuilder> - imageObjectDetectionDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - * - * @return Whether the imageObjectDetectionDatasetMetadata field is set. - */ - public boolean hasImageObjectDetectionDatasetMetadata() { - return datasetMetadataCase_ == 26; - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - * - * @return The imageObjectDetectionDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - getImageObjectDetectionDatasetMetadata() { - if (imageObjectDetectionDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - .getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 26) { - return imageObjectDetectionDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - public Builder setImageObjectDetectionDatasetMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata value) { - if (imageObjectDetectionDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - imageObjectDetectionDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 26; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - public Builder setImageObjectDetectionDatasetMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder - builderForValue) { - if (imageObjectDetectionDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - imageObjectDetectionDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 26; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - public Builder mergeImageObjectDetectionDatasetMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata value) { - if (imageObjectDetectionDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 26 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 26) { - imageObjectDetectionDatasetMetadataBuilder_.mergeFrom(value); - } - imageObjectDetectionDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 26; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - public Builder clearImageObjectDetectionDatasetMetadata() { - if (imageObjectDetectionDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 26) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 26) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - imageObjectDetectionDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder - getImageObjectDetectionDatasetMetadataBuilder() { - return getImageObjectDetectionDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataOrBuilder - getImageObjectDetectionDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 26) && (imageObjectDetectionDatasetMetadataBuilder_ != null)) { - return imageObjectDetectionDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataOrBuilder> - getImageObjectDetectionDatasetMetadataFieldBuilder() { - if (imageObjectDetectionDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 26)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - .getDefaultInstance(); - } - imageObjectDetectionDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 26; - onChanged(); - ; - return imageObjectDetectionDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataOrBuilder> - videoClassificationDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - * - * @return Whether the videoClassificationDatasetMetadata field is set. - */ - public boolean hasVideoClassificationDatasetMetadata() { - return datasetMetadataCase_ == 31; - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - * - * @return The videoClassificationDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - getVideoClassificationDatasetMetadata() { - if (videoClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 31) { - return (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - .getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 31) { - return videoClassificationDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - public Builder setVideoClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata value) { - if (videoClassificationDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - videoClassificationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 31; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - public Builder setVideoClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder - builderForValue) { - if (videoClassificationDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - videoClassificationDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 31; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - public Builder mergeVideoClassificationDatasetMetadata( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata value) { - if (videoClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 31 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 31) { - videoClassificationDatasetMetadataBuilder_.mergeFrom(value); - } - videoClassificationDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 31; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - public Builder clearVideoClassificationDatasetMetadata() { - if (videoClassificationDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 31) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 31) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - videoClassificationDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder - getVideoClassificationDatasetMetadataBuilder() { - return getVideoClassificationDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataOrBuilder - getVideoClassificationDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 31) && (videoClassificationDatasetMetadataBuilder_ != null)) { - return videoClassificationDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 31) { - return (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for video classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataOrBuilder> - getVideoClassificationDatasetMetadataFieldBuilder() { - if (videoClassificationDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 31)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - .getDefaultInstance(); - } - videoClassificationDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 31; - onChanged(); - ; - return videoClassificationDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataOrBuilder> - videoObjectTrackingDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - * - * @return Whether the videoObjectTrackingDatasetMetadata field is set. - */ - public boolean hasVideoObjectTrackingDatasetMetadata() { - return datasetMetadataCase_ == 29; - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - * - * @return The videoObjectTrackingDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - getVideoObjectTrackingDatasetMetadata() { - if (videoObjectTrackingDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 29) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - .getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 29) { - return videoObjectTrackingDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - public Builder setVideoObjectTrackingDatasetMetadata( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata value) { - if (videoObjectTrackingDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - videoObjectTrackingDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 29; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - public Builder setVideoObjectTrackingDatasetMetadata( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder - builderForValue) { - if (videoObjectTrackingDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - videoObjectTrackingDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 29; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - public Builder mergeVideoObjectTrackingDatasetMetadata( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata value) { - if (videoObjectTrackingDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 29 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 29) { - videoObjectTrackingDatasetMetadataBuilder_.mergeFrom(value); - } - videoObjectTrackingDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 29; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - public Builder clearVideoObjectTrackingDatasetMetadata() { - if (videoObjectTrackingDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 29) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 29) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - videoObjectTrackingDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder - getVideoObjectTrackingDatasetMetadataBuilder() { - return getVideoObjectTrackingDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataOrBuilder - getVideoObjectTrackingDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 29) && (videoObjectTrackingDatasetMetadataBuilder_ != null)) { - return videoObjectTrackingDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 29) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataOrBuilder> - getVideoObjectTrackingDatasetMetadataFieldBuilder() { - if (videoObjectTrackingDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 29)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - .getDefaultInstance(); - } - videoObjectTrackingDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 29; - onChanged(); - ; - return videoObjectTrackingDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataOrBuilder> - textExtractionDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - * - * @return Whether the textExtractionDatasetMetadata field is set. - */ - public boolean hasTextExtractionDatasetMetadata() { - return datasetMetadataCase_ == 28; - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - * - * @return The textExtractionDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata - getTextExtractionDatasetMetadata() { - if (textExtractionDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 28) { - return (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 28) { - return textExtractionDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - public Builder setTextExtractionDatasetMetadata( - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata value) { - if (textExtractionDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - textExtractionDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 28; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - public Builder setTextExtractionDatasetMetadata( - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder builderForValue) { - if (textExtractionDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - textExtractionDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 28; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - public Builder mergeTextExtractionDatasetMetadata( - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata value) { - if (textExtractionDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 28 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 28) { - textExtractionDatasetMetadataBuilder_.mergeFrom(value); - } - textExtractionDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 28; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - public Builder clearTextExtractionDatasetMetadata() { - if (textExtractionDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 28) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 28) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - textExtractionDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder - getTextExtractionDatasetMetadataBuilder() { - return getTextExtractionDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataOrBuilder - getTextExtractionDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 28) && (textExtractionDatasetMetadataBuilder_ != null)) { - return textExtractionDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 28) { - return (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for text extraction.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataOrBuilder> - getTextExtractionDatasetMetadataFieldBuilder() { - if (textExtractionDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 28)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance(); - } - textExtractionDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 28; - onChanged(); - ; - return textExtractionDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataOrBuilder> - textSentimentDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - * - * @return Whether the textSentimentDatasetMetadata field is set. - */ - public boolean hasTextSentimentDatasetMetadata() { - return datasetMetadataCase_ == 30; - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - * - * @return The textSentimentDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata - getTextSentimentDatasetMetadata() { - if (textSentimentDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 30) { - return (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 30) { - return textSentimentDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - public Builder setTextSentimentDatasetMetadata( - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata value) { - if (textSentimentDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - textSentimentDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 30; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - public Builder setTextSentimentDatasetMetadata( - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder builderForValue) { - if (textSentimentDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - textSentimentDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 30; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - public Builder mergeTextSentimentDatasetMetadata( - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata value) { - if (textSentimentDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 30 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata - .getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) - datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 30) { - textSentimentDatasetMetadataBuilder_.mergeFrom(value); - } - textSentimentDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 30; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - public Builder clearTextSentimentDatasetMetadata() { - if (textSentimentDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 30) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 30) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - textSentimentDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder - getTextSentimentDatasetMetadataBuilder() { - return getTextSentimentDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataOrBuilder - getTextSentimentDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 30) && (textSentimentDatasetMetadataBuilder_ != null)) { - return textSentimentDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 30) { - return (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for text sentiment.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataOrBuilder> - getTextSentimentDatasetMetadataFieldBuilder() { - if (textSentimentDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 30)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.getDefaultInstance(); - } - textSentimentDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 30; - onChanged(); - ; - return textSentimentDatasetMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesDatasetMetadata, - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TablesDatasetMetadataOrBuilder> - tablesDatasetMetadataBuilder_; - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - * - * @return Whether the tablesDatasetMetadata field is set. - */ - public boolean hasTablesDatasetMetadata() { - return datasetMetadataCase_ == 33; - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - * - * @return The tablesDatasetMetadata. - */ - public com.google.cloud.automl.v1beta1.TablesDatasetMetadata getTablesDatasetMetadata() { - if (tablesDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 33) { - return (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance(); - } else { - if (datasetMetadataCase_ == 33) { - return tablesDatasetMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - public Builder setTablesDatasetMetadata( - com.google.cloud.automl.v1beta1.TablesDatasetMetadata value) { - if (tablesDatasetMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datasetMetadata_ = value; - onChanged(); - } else { - tablesDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 33; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - public Builder setTablesDatasetMetadata( - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder builderForValue) { - if (tablesDatasetMetadataBuilder_ == null) { - datasetMetadata_ = builderForValue.build(); - onChanged(); - } else { - tablesDatasetMetadataBuilder_.setMessage(builderForValue.build()); - } - datasetMetadataCase_ = 33; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - public Builder mergeTablesDatasetMetadata( - com.google.cloud.automl.v1beta1.TablesDatasetMetadata value) { - if (tablesDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 33 - && datasetMetadata_ - != com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance()) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - datasetMetadata_ = value; - } - onChanged(); - } else { - if (datasetMetadataCase_ == 33) { - tablesDatasetMetadataBuilder_.mergeFrom(value); - } - tablesDatasetMetadataBuilder_.setMessage(value); - } - datasetMetadataCase_ = 33; - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - public Builder clearTablesDatasetMetadata() { - if (tablesDatasetMetadataBuilder_ == null) { - if (datasetMetadataCase_ == 33) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - onChanged(); - } - } else { - if (datasetMetadataCase_ == 33) { - datasetMetadataCase_ = 0; - datasetMetadata_ = null; - } - tablesDatasetMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - public com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder - getTablesDatasetMetadataBuilder() { - return getTablesDatasetMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - public com.google.cloud.automl.v1beta1.TablesDatasetMetadataOrBuilder - getTablesDatasetMetadataOrBuilder() { - if ((datasetMetadataCase_ == 33) && (tablesDatasetMetadataBuilder_ != null)) { - return tablesDatasetMetadataBuilder_.getMessageOrBuilder(); - } else { - if (datasetMetadataCase_ == 33) { - return (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for a dataset used for Tables.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesDatasetMetadata, - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TablesDatasetMetadataOrBuilder> - getTablesDatasetMetadataFieldBuilder() { - if (tablesDatasetMetadataBuilder_ == null) { - if (!(datasetMetadataCase_ == 33)) { - datasetMetadata_ = - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance(); - } - tablesDatasetMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesDatasetMetadata, - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder, - com.google.cloud.automl.v1beta1.TablesDatasetMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) datasetMetadata_, - getParentForChildren(), - isClean()); - datasetMetadata_ = null; - } - datasetMetadataCase_ = 33; - onChanged(); - ; - return tablesDatasetMetadataBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The resource name of the dataset.
-     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-     * 
- * - * string name = 1; - * - * @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.
-     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. The resource name of the dataset.
-     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-     * 
- * - * 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; - } - /** - * - * - *
-     * Output only. The resource name of the dataset.
-     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the dataset.
-     * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-     * 
- * - * string name = 1; - * - * @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 name of the dataset to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9.
-     * 
- * - * string display_name = 2; - * - * @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 name of the dataset to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9.
-     * 
- * - * string display_name = 2; - * - * @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 name of the dataset to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9.
-     * 
- * - * string display_name = 2; - * - * @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 name of the dataset to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9.
-     * 
- * - * string display_name = 2; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the dataset to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9.
-     * 
- * - * string display_name = 2; - * - * @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_ = ""; - /** - * - * - *
-     * User-provided description of the dataset. The description can be up to
-     * 25000 characters long.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * User-provided description of the dataset. The description can be up to
-     * 25000 characters long.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * User-provided description of the dataset. The description can be up to
-     * 25000 characters long.
-     * 
- * - * 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; - } - /** - * - * - *
-     * User-provided description of the dataset. The description can be up to
-     * 25000 characters long.
-     * 
- * - * string description = 3; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * User-provided description of the dataset. The description can be up to
-     * 25000 characters long.
-     * 
- * - * string description = 3; - * - * @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 int exampleCount_; - /** - * - * - *
-     * Output only. The number of examples in the dataset.
-     * 
- * - * int32 example_count = 21; - * - * @return The exampleCount. - */ - public int getExampleCount() { - return exampleCount_; - } - /** - * - * - *
-     * Output only. The number of examples in the dataset.
-     * 
- * - * int32 example_count = 21; - * - * @param value The exampleCount to set. - * @return This builder for chaining. - */ - public Builder setExampleCount(int value) { - - exampleCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of examples in the dataset.
-     * 
- * - * int32 example_count = 21; - * - * @return This builder for chaining. - */ - public Builder clearExampleCount() { - - exampleCount_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. Timestamp when this dataset was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 14; - * - * @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 = 14; - * - * @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 = 14; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this dataset was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this dataset was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this dataset was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this dataset was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Timestamp when this dataset was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. Timestamp when this dataset was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * Used to perform consistent read-modify-write updates. If not set, a blind
-     * "overwrite" update happens.
-     * 
- * - * string etag = 17; - * - * @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 = 17; - * - * @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 = 17; - * - * @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 = 17; - * - * @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 = 17; - * - * @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.automl.v1beta1.Dataset) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Dataset) - private static final com.google.cloud.automl.v1beta1.Dataset DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Dataset(); - } - - public static com.google.cloud.automl.v1beta1.Dataset getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Dataset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Dataset(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Dataset getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetName.java deleted file mode 100644 index 69c9ef9b6..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetName.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.automl.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class DatasetName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/datasets/{dataset}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String dataset; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataset() { - return dataset; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private DatasetName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataset = Preconditions.checkNotNull(builder.getDataset()); - } - - public static DatasetName of(String project, String location, String dataset) { - return newBuilder().setProject(project).setLocation(location).setDataset(dataset).build(); - } - - public static String format(String project, String location, String dataset) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataset(dataset) - .build() - .toString(); - } - - public static DatasetName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "DatasetName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("dataset")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (DatasetName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldMapBuilder.put("dataset", dataset); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location, "dataset", dataset); - } - - /** Builder for DatasetName. */ - public static class Builder { - - private String project; - private String location; - private String dataset; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataset() { - return dataset; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setDataset(String dataset) { - this.dataset = dataset; - return this; - } - - private Builder() {} - - private Builder(DatasetName datasetName) { - project = datasetName.project; - location = datasetName.location; - dataset = datasetName.dataset; - } - - public DatasetName build() { - return new DatasetName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof DatasetName) { - DatasetName that = (DatasetName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataset.equals(that.dataset)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataset.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOrBuilder.java deleted file mode 100644 index ef0558043..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOrBuilder.java +++ /dev/null @@ -1,564 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/dataset.proto - -package com.google.cloud.automl.v1beta1; - -public interface DatasetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Dataset) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Metadata for a dataset used for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - * - * @return Whether the translationDatasetMetadata field is set. - */ - boolean hasTranslationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - * - * @return The translationDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata getTranslationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationDatasetMetadata translation_dataset_metadata = 23; - * - */ - com.google.cloud.automl.v1beta1.TranslationDatasetMetadataOrBuilder - getTranslationDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for image classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - * - * @return Whether the imageClassificationDatasetMetadata field is set. - */ - boolean hasImageClassificationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for image classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - * - * @return The imageClassificationDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - getImageClassificationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for image classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - * - */ - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataOrBuilder - getImageClassificationDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for text classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - * - * @return Whether the textClassificationDatasetMetadata field is set. - */ - boolean hasTextClassificationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for text classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - * - * @return The textClassificationDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - getTextClassificationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for text classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - * - */ - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataOrBuilder - getTextClassificationDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - * - * @return Whether the imageObjectDetectionDatasetMetadata field is set. - */ - boolean hasImageObjectDetectionDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - * - * @return The imageObjectDetectionDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - getImageObjectDetectionDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - * - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataOrBuilder - getImageObjectDetectionDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for video classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - * - * @return Whether the videoClassificationDatasetMetadata field is set. - */ - boolean hasVideoClassificationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for video classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - * - * @return The videoClassificationDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - getVideoClassificationDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for video classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - * - */ - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataOrBuilder - getVideoClassificationDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - * - * @return Whether the videoObjectTrackingDatasetMetadata field is set. - */ - boolean hasVideoObjectTrackingDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - * - * @return The videoObjectTrackingDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - getVideoObjectTrackingDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - * - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataOrBuilder - getVideoObjectTrackingDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for text extraction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - * - * @return Whether the textExtractionDatasetMetadata field is set. - */ - boolean hasTextExtractionDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for text extraction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - * - * @return The textExtractionDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata getTextExtractionDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for text extraction.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - * - */ - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataOrBuilder - getTextExtractionDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for text sentiment.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - * - * @return Whether the textSentimentDatasetMetadata field is set. - */ - boolean hasTextSentimentDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for text sentiment.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - * - * @return The textSentimentDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata getTextSentimentDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for text sentiment.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - * - */ - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataOrBuilder - getTextSentimentDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for a dataset used for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - * - * @return Whether the tablesDatasetMetadata field is set. - */ - boolean hasTablesDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - * - * @return The tablesDatasetMetadata. - */ - com.google.cloud.automl.v1beta1.TablesDatasetMetadata getTablesDatasetMetadata(); - /** - * - * - *
-   * Metadata for a dataset used for Tables.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesDatasetMetadata tables_dataset_metadata = 33; - */ - com.google.cloud.automl.v1beta1.TablesDatasetMetadataOrBuilder - getTablesDatasetMetadataOrBuilder(); - - /** - * - * - *
-   * Output only. The resource name of the dataset.
-   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name of the dataset.
-   * Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The name of the dataset to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9.
-   * 
- * - * string display_name = 2; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Required. The name of the dataset to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9.
-   * 
- * - * string display_name = 2; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * User-provided description of the dataset. The description can be up to
-   * 25000 characters long.
-   * 
- * - * string description = 3; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * User-provided description of the dataset. The description can be up to
-   * 25000 characters long.
-   * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Output only. The number of examples in the dataset.
-   * 
- * - * int32 example_count = 21; - * - * @return The exampleCount. - */ - int getExampleCount(); - - /** - * - * - *
-   * Output only. Timestamp when this dataset was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 14; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. Timestamp when this dataset was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 14; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. Timestamp when this dataset was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 14; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Used to perform consistent read-modify-write updates. If not set, a blind
-   * "overwrite" update happens.
-   * 
- * - * string etag = 17; - * - * @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 = 17; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); - - public com.google.cloud.automl.v1beta1.Dataset.DatasetMetadataCase getDatasetMetadataCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOuterClass.java deleted file mode 100644 index fa5f11186..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DatasetOuterClass.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/dataset.proto - -package com.google.cloud.automl.v1beta1; - -public final class DatasetOuterClass { - private DatasetOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Dataset_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Dataset_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n)google/cloud/automl/v1beta1/dataset.pr" - + "oto\022\033google.cloud.automl.v1beta1\032\031google" - + "/api/resource.proto\032\'google/cloud/automl" - + "/v1beta1/image.proto\032(google/cloud/autom" - + "l/v1beta1/tables.proto\032&google/cloud/aut" - + "oml/v1beta1/text.proto\032-google/cloud/aut" - + "oml/v1beta1/translation.proto\032\'google/cl" - + "oud/automl/v1beta1/video.proto\032\037google/p" - + "rotobuf/timestamp.proto\032\034google/api/anno" - + "tations.proto\"\316\t\n\007Dataset\022_\n\034translation" - + "_dataset_metadata\030\027 \001(\01327.google.cloud.a" - + "utoml.v1beta1.TranslationDatasetMetadata" - + "H\000\022p\n%image_classification_dataset_metad" - + "ata\030\030 \001(\0132?.google.cloud.automl.v1beta1." - + "ImageClassificationDatasetMetadataH\000\022n\n$" - + "text_classification_dataset_metadata\030\031 \001" - + "(\0132>.google.cloud.automl.v1beta1.TextCla" - + "ssificationDatasetMetadataH\000\022s\n\'image_ob" - + "ject_detection_dataset_metadata\030\032 \001(\0132@." - + "google.cloud.automl.v1beta1.ImageObjectD" - + "etectionDatasetMetadataH\000\022p\n%video_class" - + "ification_dataset_metadata\030\037 \001(\0132?.googl" - + "e.cloud.automl.v1beta1.VideoClassificati" - + "onDatasetMetadataH\000\022q\n&video_object_trac" - + "king_dataset_metadata\030\035 \001(\0132?.google.clo" - + "ud.automl.v1beta1.VideoObjectTrackingDat" - + "asetMetadataH\000\022f\n text_extraction_datase" - + "t_metadata\030\034 \001(\0132:.google.cloud.automl.v" - + "1beta1.TextExtractionDatasetMetadataH\000\022d" - + "\n\037text_sentiment_dataset_metadata\030\036 \001(\0132" - + "9.google.cloud.automl.v1beta1.TextSentim" - + "entDatasetMetadataH\000\022U\n\027tables_dataset_m" - + "etadata\030! \001(\01322.google.cloud.automl.v1be" - + "ta1.TablesDatasetMetadataH\000\022\014\n\004name\030\001 \001(" - + "\t\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003" - + " \001(\t\022\025\n\rexample_count\030\025 \001(\005\022/\n\013create_ti" - + "me\030\016 \001(\0132\032.google.protobuf.Timestamp\022\014\n\004" - + "etag\030\021 \001(\t:^\352A[\n\035automl.googleapis.com/D" - + "ataset\022:projects/{project}/locations/{lo" - + "cation}/datasets/{dataset}B\022\n\020dataset_me" - + "tadataB\245\001\n\037com.google.cloud.automl.v1bet" - + "a1P\001ZAgoogle.golang.org/genproto/googlea" - + "pis/cloud/automl/v1beta1;automl\312\002\033Google" - + "\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Cloud::A" - + "utoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.automl.v1beta1.ImageProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Tables.getDescriptor(), - com.google.cloud.automl.v1beta1.TextProto.getDescriptor(), - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(), - com.google.cloud.automl.v1beta1.VideoProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_Dataset_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_Dataset_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Dataset_descriptor, - new java.lang.String[] { - "TranslationDatasetMetadata", - "ImageClassificationDatasetMetadata", - "TextClassificationDatasetMetadata", - "ImageObjectDetectionDatasetMetadata", - "VideoClassificationDatasetMetadata", - "VideoObjectTrackingDatasetMetadata", - "TextExtractionDatasetMetadata", - "TextSentimentDatasetMetadata", - "TablesDatasetMetadata", - "Name", - "DisplayName", - "Description", - "ExampleCount", - "CreateTime", - "Etag", - "DatasetMetadata", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.automl.v1beta1.ImageProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Tables.getDescriptor(); - com.google.cloud.automl.v1beta1.TextProto.getDescriptor(); - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(); - com.google.cloud.automl.v1beta1.VideoProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequest.java deleted file mode 100644 index 67790dbae..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequest.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeleteDatasetRequest} - */ -public final class DeleteDatasetRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeleteDatasetRequest.class, - com.google.cloud.automl.v1beta1.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.
-   * 
- * - * - * 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) { - 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.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DeleteDatasetRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DeleteDatasetRequest other = - (com.google.cloud.automl.v1beta1.DeleteDatasetRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.DeleteDatasetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeleteDatasetRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DeleteDatasetRequest) - com.google.cloud.automl.v1beta1.DeleteDatasetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeleteDatasetRequest.class, - com.google.cloud.automl.v1beta1.DeleteDatasetRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DeleteDatasetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteDatasetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteDatasetRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DeleteDatasetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteDatasetRequest build() { - com.google.cloud.automl.v1beta1.DeleteDatasetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteDatasetRequest buildPartial() { - com.google.cloud.automl.v1beta1.DeleteDatasetRequest result = - new com.google.cloud.automl.v1beta1.DeleteDatasetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DeleteDatasetRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.DeleteDatasetRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DeleteDatasetRequest other) { - if (other == com.google.cloud.automl.v1beta1.DeleteDatasetRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DeleteDatasetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.automl.v1beta1.DeleteDatasetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DeleteDatasetRequest) - private static final com.google.cloud.automl.v1beta1.DeleteDatasetRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DeleteDatasetRequest(); - } - - public static com.google.cloud.automl.v1beta1.DeleteDatasetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteDatasetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteDatasetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteDatasetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequestOrBuilder.java deleted file mode 100644 index ae1b89874..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteDatasetRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface DeleteDatasetRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DeleteDatasetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the dataset to delete.
-   * 
- * - * - * 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.
-   * 
- * - * - * 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequest.java deleted file mode 100644 index 886ce3561..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequest.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeleteModelRequest} - */ -public final class DeleteModelRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeleteModelRequest.class, - com.google.cloud.automl.v1beta1.DeleteModelRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Resource name of the model being deleted.
-   * 
- * - * - * 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) { - 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. Resource name of the model being deleted.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DeleteModelRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DeleteModelRequest other = - (com.google.cloud.automl.v1beta1.DeleteModelRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.DeleteModelRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeleteModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DeleteModelRequest) - com.google.cloud.automl.v1beta1.DeleteModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeleteModelRequest.class, - com.google.cloud.automl.v1beta1.DeleteModelRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DeleteModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeleteModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteModelRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DeleteModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteModelRequest build() { - com.google.cloud.automl.v1beta1.DeleteModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteModelRequest buildPartial() { - com.google.cloud.automl.v1beta1.DeleteModelRequest result = - new com.google.cloud.automl.v1beta1.DeleteModelRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DeleteModelRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.DeleteModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DeleteModelRequest other) { - if (other == com.google.cloud.automl.v1beta1.DeleteModelRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DeleteModelRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.DeleteModelRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Resource name of the model being deleted.
-     * 
- * - * - * 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. Resource name of the model being deleted.
-     * 
- * - * - * 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. Resource name of the model being deleted.
-     * 
- * - * - * 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. Resource name of the model being deleted.
-     * 
- * - * - * 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. Resource name of the model being deleted.
-     * 
- * - * - * 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.automl.v1beta1.DeleteModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DeleteModelRequest) - private static final com.google.cloud.automl.v1beta1.DeleteModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DeleteModelRequest(); - } - - public static com.google.cloud.automl.v1beta1.DeleteModelRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteModelRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteModelRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequestOrBuilder.java deleted file mode 100644 index 3e0f039f4..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteModelRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface DeleteModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DeleteModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of the model being deleted.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Resource name of the model being deleted.
-   * 
- * - * - * 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadata.java deleted file mode 100644 index 962bb5eb1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadata.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of operations that perform deletes of any entities.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeleteOperationMetadata} - */ -public final class DeleteOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.class, - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DeleteOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DeleteOperationMetadata other = - (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.DeleteOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Details of operations that perform deletes of any entities.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeleteOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DeleteOperationMetadata) - com.google.cloud.automl.v1beta1.DeleteOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.class, - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DeleteOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteOperationMetadata build() { - com.google.cloud.automl.v1beta1.DeleteOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.DeleteOperationMetadata result = - new com.google.cloud.automl.v1beta1.DeleteOperationMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DeleteOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.DeleteOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DeleteOperationMetadata other) { - if (other == com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DeleteOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.DeleteOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DeleteOperationMetadata) - private static final com.google.cloud.automl.v1beta1.DeleteOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DeleteOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.DeleteOperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteOperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeleteOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadataOrBuilder.java deleted file mode 100644 index ad727f290..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeleteOperationMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface DeleteOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DeleteOperationMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadata.java deleted file mode 100644 index 0146d792d..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadata.java +++ /dev/null @@ -1,460 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of DeployModel operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeployModelOperationMetadata} - */ -public final class DeployModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DeployModelOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata other = - (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DeployModelOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeployModelOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeployModelOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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; - } - /** - * - * - *
-   * Details of DeployModel operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeployModelOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DeployModelOperationMetadata) - com.google.cloud.automl.v1beta1.DeployModelOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadata build() { - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata result = - new com.google.cloud.automl.v1beta1.DeployModelOperationMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DeployModelOperationMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.DeployModelOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DeployModelOperationMetadata) - private static final com.google.cloud.automl.v1beta1.DeployModelOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DeployModelOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadataOrBuilder.java deleted file mode 100644 index b0d95bc95..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelOperationMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface DeployModelOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DeployModelOperationMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequest.java deleted file mode 100644 index 31805c95b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequest.java +++ /dev/null @@ -1,1453 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeployModelRequest} - */ -public final class DeployModelRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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() { - name_ = ""; - } - - @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(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder - subBuilder = null; - if (modelDeploymentMetadataCase_ == 2) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_) - .toBuilder(); - } - modelDeploymentMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_); - modelDeploymentMetadata_ = subBuilder.buildPartial(); - } - modelDeploymentMetadataCase_ = 2; - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder - subBuilder = null; - if (modelDeploymentMetadataCase_ == 4) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_) - .toBuilder(); - } - modelDeploymentMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_); - modelDeploymentMetadata_ = subBuilder.buildPartial(); - } - modelDeploymentMetadataCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeployModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeployModelRequest.class, - com.google.cloud.automl.v1beta1.DeployModelRequest.Builder.class); - } - - private int modelDeploymentMetadataCase_ = 0; - private java.lang.Object modelDeploymentMetadata_; - - public enum ModelDeploymentMetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA(2), - IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA(4), - MODELDEPLOYMENTMETADATA_NOT_SET(0); - private final int value; - - private ModelDeploymentMetadataCase(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 ModelDeploymentMetadataCase valueOf(int value) { - return forNumber(value); - } - - public static ModelDeploymentMetadataCase forNumber(int value) { - switch (value) { - case 2: - return IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA; - case 4: - return IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA; - case 0: - return MODELDEPLOYMENTMETADATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ModelDeploymentMetadataCase getModelDeploymentMetadataCase() { - return ModelDeploymentMetadataCase.forNumber(modelDeploymentMetadataCase_); - } - - public static final int IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER = 2; - /** - * - * - *
-   * Model deployment metadata specific to Image Object Detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - * - * @return Whether the imageObjectDetectionModelDeploymentMetadata field is set. - */ - public boolean hasImageObjectDetectionModelDeploymentMetadata() { - return modelDeploymentMetadataCase_ == 2; - } - /** - * - * - *
-   * Model deployment metadata specific to Image Object Detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - * - * @return The imageObjectDetectionModelDeploymentMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - getImageObjectDetectionModelDeploymentMetadata() { - if (modelDeploymentMetadataCase_ == 2) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance(); - } - /** - * - * - *
-   * Model deployment metadata specific to Image Object Detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadataOrBuilder - getImageObjectDetectionModelDeploymentMetadataOrBuilder() { - if (modelDeploymentMetadataCase_ == 2) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance(); - } - - public static final int IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER = 4; - /** - * - * - *
-   * Model deployment metadata specific to Image Classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - * - * @return Whether the imageClassificationModelDeploymentMetadata field is set. - */ - public boolean hasImageClassificationModelDeploymentMetadata() { - return modelDeploymentMetadataCase_ == 4; - } - /** - * - * - *
-   * Model deployment metadata specific to Image Classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - * - * @return The imageClassificationModelDeploymentMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - getImageClassificationModelDeploymentMetadata() { - if (modelDeploymentMetadataCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance(); - } - /** - * - * - *
-   * Model deployment metadata specific to Image Classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder - getImageClassificationModelDeploymentMetadataOrBuilder() { - if (modelDeploymentMetadataCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Resource name of the model to deploy.
-   * 
- * - * - * 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) { - 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. Resource name of the model to deploy.
-   * 
- * - * - * 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 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_); - } - if (modelDeploymentMetadataCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_); - } - if (modelDeploymentMetadataCase_ == 4) { - output.writeMessage( - 4, - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_); - } - 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 (modelDeploymentMetadataCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_); - } - if (modelDeploymentMetadataCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DeployModelRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DeployModelRequest other = - (com.google.cloud.automl.v1beta1.DeployModelRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getModelDeploymentMetadataCase().equals(other.getModelDeploymentMetadataCase())) - return false; - switch (modelDeploymentMetadataCase_) { - case 2: - if (!getImageObjectDetectionModelDeploymentMetadata() - .equals(other.getImageObjectDetectionModelDeploymentMetadata())) return false; - break; - case 4: - if (!getImageClassificationModelDeploymentMetadata() - .equals(other.getImageClassificationModelDeploymentMetadata())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - switch (modelDeploymentMetadataCase_) { - case 2: - hash = (37 * hash) + IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getImageObjectDetectionModelDeploymentMetadata().hashCode(); - break; - case 4: - hash = (37 * hash) + IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getImageClassificationModelDeploymentMetadata().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DeployModelRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DeployModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DeployModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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 [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DeployModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DeployModelRequest) - com.google.cloud.automl.v1beta1.DeployModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeployModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DeployModelRequest.class, - com.google.cloud.automl.v1beta1.DeployModelRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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(); - name_ = ""; - - modelDeploymentMetadataCase_ = 0; - modelDeploymentMetadata_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_DeployModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeployModelRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DeployModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeployModelRequest build() { - com.google.cloud.automl.v1beta1.DeployModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DeployModelRequest buildPartial() { - com.google.cloud.automl.v1beta1.DeployModelRequest result = - new com.google.cloud.automl.v1beta1.DeployModelRequest(this); - if (modelDeploymentMetadataCase_ == 2) { - if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { - result.modelDeploymentMetadata_ = modelDeploymentMetadata_; - } else { - result.modelDeploymentMetadata_ = - imageObjectDetectionModelDeploymentMetadataBuilder_.build(); - } - } - if (modelDeploymentMetadataCase_ == 4) { - if (imageClassificationModelDeploymentMetadataBuilder_ == null) { - result.modelDeploymentMetadata_ = modelDeploymentMetadata_; - } else { - result.modelDeploymentMetadata_ = - imageClassificationModelDeploymentMetadataBuilder_.build(); - } - } - result.name_ = name_; - result.modelDeploymentMetadataCase_ = modelDeploymentMetadataCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DeployModelRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.DeployModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DeployModelRequest other) { - if (other == com.google.cloud.automl.v1beta1.DeployModelRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - switch (other.getModelDeploymentMetadataCase()) { - case IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA: - { - mergeImageObjectDetectionModelDeploymentMetadata( - other.getImageObjectDetectionModelDeploymentMetadata()); - break; - } - case IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA: - { - mergeImageClassificationModelDeploymentMetadata( - other.getImageClassificationModelDeploymentMetadata()); - break; - } - case MODELDEPLOYMENTMETADATA_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DeployModelRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.DeployModelRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int modelDeploymentMetadataCase_ = 0; - private java.lang.Object modelDeploymentMetadata_; - - public ModelDeploymentMetadataCase getModelDeploymentMetadataCase() { - return ModelDeploymentMetadataCase.forNumber(modelDeploymentMetadataCase_); - } - - public Builder clearModelDeploymentMetadata() { - modelDeploymentMetadataCase_ = 0; - modelDeploymentMetadata_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadataOrBuilder> - imageObjectDetectionModelDeploymentMetadataBuilder_; - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - * - * @return Whether the imageObjectDetectionModelDeploymentMetadata field is set. - */ - public boolean hasImageObjectDetectionModelDeploymentMetadata() { - return modelDeploymentMetadataCase_ == 2; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - * - * @return The imageObjectDetectionModelDeploymentMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - getImageObjectDetectionModelDeploymentMetadata() { - if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { - if (modelDeploymentMetadataCase_ == 2) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance(); - } else { - if (modelDeploymentMetadataCase_ == 2) { - return imageObjectDetectionModelDeploymentMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - public Builder setImageObjectDetectionModelDeploymentMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata value) { - if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelDeploymentMetadata_ = value; - onChanged(); - } else { - imageObjectDetectionModelDeploymentMetadataBuilder_.setMessage(value); - } - modelDeploymentMetadataCase_ = 2; - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - public Builder setImageObjectDetectionModelDeploymentMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder - builderForValue) { - if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { - modelDeploymentMetadata_ = builderForValue.build(); - onChanged(); - } else { - imageObjectDetectionModelDeploymentMetadataBuilder_.setMessage(builderForValue.build()); - } - modelDeploymentMetadataCase_ = 2; - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - public Builder mergeImageObjectDetectionModelDeploymentMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata value) { - if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { - if (modelDeploymentMetadataCase_ == 2 - && modelDeploymentMetadata_ - != com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance()) { - modelDeploymentMetadata_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .newBuilder( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelDeploymentMetadata_ = value; - } - onChanged(); - } else { - if (modelDeploymentMetadataCase_ == 2) { - imageObjectDetectionModelDeploymentMetadataBuilder_.mergeFrom(value); - } - imageObjectDetectionModelDeploymentMetadataBuilder_.setMessage(value); - } - modelDeploymentMetadataCase_ = 2; - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - public Builder clearImageObjectDetectionModelDeploymentMetadata() { - if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { - if (modelDeploymentMetadataCase_ == 2) { - modelDeploymentMetadataCase_ = 0; - modelDeploymentMetadata_ = null; - onChanged(); - } - } else { - if (modelDeploymentMetadataCase_ == 2) { - modelDeploymentMetadataCase_ = 0; - modelDeploymentMetadata_ = null; - } - imageObjectDetectionModelDeploymentMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder - getImageObjectDetectionModelDeploymentMetadataBuilder() { - return getImageObjectDetectionModelDeploymentMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadataOrBuilder - getImageObjectDetectionModelDeploymentMetadataOrBuilder() { - if ((modelDeploymentMetadataCase_ == 2) - && (imageObjectDetectionModelDeploymentMetadataBuilder_ != null)) { - return imageObjectDetectionModelDeploymentMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelDeploymentMetadataCase_ == 2) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model deployment metadata specific to Image Object Detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadataOrBuilder> - getImageObjectDetectionModelDeploymentMetadataFieldBuilder() { - if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) { - if (!(modelDeploymentMetadataCase_ == 2)) { - modelDeploymentMetadata_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance(); - } - imageObjectDetectionModelDeploymentMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder, - com.google.cloud.automl.v1beta1 - .ImageObjectDetectionModelDeploymentMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - modelDeploymentMetadata_, - getParentForChildren(), - isClean()); - modelDeploymentMetadata_ = null; - } - modelDeploymentMetadataCase_ = 2; - onChanged(); - ; - return imageObjectDetectionModelDeploymentMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder> - imageClassificationModelDeploymentMetadataBuilder_; - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - * - * @return Whether the imageClassificationModelDeploymentMetadata field is set. - */ - public boolean hasImageClassificationModelDeploymentMetadata() { - return modelDeploymentMetadataCase_ == 4; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - * - * @return The imageClassificationModelDeploymentMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - getImageClassificationModelDeploymentMetadata() { - if (imageClassificationModelDeploymentMetadataBuilder_ == null) { - if (modelDeploymentMetadataCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance(); - } else { - if (modelDeploymentMetadataCase_ == 4) { - return imageClassificationModelDeploymentMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - public Builder setImageClassificationModelDeploymentMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata value) { - if (imageClassificationModelDeploymentMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelDeploymentMetadata_ = value; - onChanged(); - } else { - imageClassificationModelDeploymentMetadataBuilder_.setMessage(value); - } - modelDeploymentMetadataCase_ = 4; - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - public Builder setImageClassificationModelDeploymentMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder - builderForValue) { - if (imageClassificationModelDeploymentMetadataBuilder_ == null) { - modelDeploymentMetadata_ = builderForValue.build(); - onChanged(); - } else { - imageClassificationModelDeploymentMetadataBuilder_.setMessage(builderForValue.build()); - } - modelDeploymentMetadataCase_ = 4; - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - public Builder mergeImageClassificationModelDeploymentMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata value) { - if (imageClassificationModelDeploymentMetadataBuilder_ == null) { - if (modelDeploymentMetadataCase_ == 4 - && modelDeploymentMetadata_ - != com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance()) { - modelDeploymentMetadata_ = - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelDeploymentMetadata_ = value; - } - onChanged(); - } else { - if (modelDeploymentMetadataCase_ == 4) { - imageClassificationModelDeploymentMetadataBuilder_.mergeFrom(value); - } - imageClassificationModelDeploymentMetadataBuilder_.setMessage(value); - } - modelDeploymentMetadataCase_ = 4; - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - public Builder clearImageClassificationModelDeploymentMetadata() { - if (imageClassificationModelDeploymentMetadataBuilder_ == null) { - if (modelDeploymentMetadataCase_ == 4) { - modelDeploymentMetadataCase_ = 0; - modelDeploymentMetadata_ = null; - onChanged(); - } - } else { - if (modelDeploymentMetadataCase_ == 4) { - modelDeploymentMetadataCase_ = 0; - modelDeploymentMetadata_ = null; - } - imageClassificationModelDeploymentMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder - getImageClassificationModelDeploymentMetadataBuilder() { - return getImageClassificationModelDeploymentMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder - getImageClassificationModelDeploymentMetadataOrBuilder() { - if ((modelDeploymentMetadataCase_ == 4) - && (imageClassificationModelDeploymentMetadataBuilder_ != null)) { - return imageClassificationModelDeploymentMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelDeploymentMetadataCase_ == 4) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model deployment metadata specific to Image Classification.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder> - getImageClassificationModelDeploymentMetadataFieldBuilder() { - if (imageClassificationModelDeploymentMetadataBuilder_ == null) { - if (!(modelDeploymentMetadataCase_ == 4)) { - modelDeploymentMetadata_ = - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance(); - } - imageClassificationModelDeploymentMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder, - com.google.cloud.automl.v1beta1 - .ImageClassificationModelDeploymentMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - modelDeploymentMetadata_, - getParentForChildren(), - isClean()); - modelDeploymentMetadata_ = null; - } - modelDeploymentMetadataCase_ = 4; - onChanged(); - ; - return imageClassificationModelDeploymentMetadataBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Resource name of the model to deploy.
-     * 
- * - * - * 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. Resource name of the model to deploy.
-     * 
- * - * - * 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. Resource name of the model to deploy.
-     * 
- * - * - * 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. Resource name of the model to deploy.
-     * 
- * - * - * 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. Resource name of the model to deploy.
-     * 
- * - * - * 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.automl.v1beta1.DeployModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DeployModelRequest) - private static final com.google.cloud.automl.v1beta1.DeployModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DeployModelRequest(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.DeployModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequestOrBuilder.java deleted file mode 100644 index 3394982ce..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DeployModelRequestOrBuilder.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface DeployModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DeployModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Model deployment metadata specific to Image Object Detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - * - * @return Whether the imageObjectDetectionModelDeploymentMetadata field is set. - */ - boolean hasImageObjectDetectionModelDeploymentMetadata(); - /** - * - * - *
-   * Model deployment metadata specific to Image Object Detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - * - * @return The imageObjectDetectionModelDeploymentMetadata. - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - getImageObjectDetectionModelDeploymentMetadata(); - /** - * - * - *
-   * Model deployment metadata specific to Image Object Detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - * - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadataOrBuilder - getImageObjectDetectionModelDeploymentMetadataOrBuilder(); - - /** - * - * - *
-   * Model deployment metadata specific to Image Classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - * - * @return Whether the imageClassificationModelDeploymentMetadata field is set. - */ - boolean hasImageClassificationModelDeploymentMetadata(); - /** - * - * - *
-   * Model deployment metadata specific to Image Classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - * - * @return The imageClassificationModelDeploymentMetadata. - */ - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - getImageClassificationModelDeploymentMetadata(); - /** - * - * - *
-   * Model deployment metadata specific to Image Classification.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - * - */ - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder - getImageClassificationModelDeploymentMetadataOrBuilder(); - - /** - * - * - *
-   * Required. Resource name of the model to deploy.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Resource name of the model to deploy.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - public com.google.cloud.automl.v1beta1.DeployModelRequest.ModelDeploymentMetadataCase - getModelDeploymentMetadataCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Detection.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Detection.java deleted file mode 100644 index eee627884..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Detection.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -public final class Detection { - private Detection() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n+google/cloud/automl/v1beta1/detection." - + "proto\022\033google.cloud.automl.v1beta1\032*goog" - + "le/cloud/automl/v1beta1/geometry.proto\032\036" - + "google/protobuf/duration.proto\032\034google/a" - + "pi/annotations.proto\"p\n\036ImageObjectDetec" - + "tionAnnotation\022?\n\014bounding_box\030\001 \001(\0132).g" - + "oogle.cloud.automl.v1beta1.BoundingPoly\022" - + "\r\n\005score\030\002 \001(\002\"\264\001\n\035VideoObjectTrackingAn" - + "notation\022\023\n\013instance_id\030\001 \001(\t\022.\n\013time_of" - + "fset\030\002 \001(\0132\031.google.protobuf.Duration\022?\n" - + "\014bounding_box\030\003 \001(\0132).google.cloud.autom" - + "l.v1beta1.BoundingPoly\022\r\n\005score\030\004 \001(\002\"\256\002" - + "\n\027BoundingBoxMetricsEntry\022\025\n\riou_thresho" - + "ld\030\001 \001(\002\022\036\n\026mean_average_precision\030\002 \001(\002" - + "\022o\n\032confidence_metrics_entries\030\003 \003(\0132K.g" - + "oogle.cloud.automl.v1beta1.BoundingBoxMe" - + "tricsEntry.ConfidenceMetricsEntry\032k\n\026Con" - + "fidenceMetricsEntry\022\034\n\024confidence_thresh" - + "old\030\001 \001(\002\022\016\n\006recall\030\002 \001(\002\022\021\n\tprecision\030\003" - + " \001(\002\022\020\n\010f1_score\030\004 \001(\002\"\326\001\n%ImageObjectDe" - + "tectionEvaluationMetrics\022$\n\034evaluated_bo" - + "unding_box_count\030\001 \001(\005\022Z\n\034bounding_box_m" - + "etrics_entries\030\002 \003(\01324.google.cloud.auto" - + "ml.v1beta1.BoundingBoxMetricsEntry\022+\n#bo" - + "unding_box_mean_average_precision\030\003 \001(\002\"" - + "\364\001\n$VideoObjectTrackingEvaluationMetrics" - + "\022\035\n\025evaluated_frame_count\030\001 \001(\005\022$\n\034evalu" - + "ated_bounding_box_count\030\002 \001(\005\022Z\n\034boundin" - + "g_box_metrics_entries\030\004 \003(\01324.google.clo" - + "ud.automl.v1beta1.BoundingBoxMetricsEntr" - + "y\022+\n#bounding_box_mean_average_precision" - + "\030\006 \001(\002B\245\001\n\037com.google.cloud.automl.v1bet" - + "a1P\001ZAgoogle.golang.org/genproto/googlea" - + "pis/cloud/automl/v1beta1;automl\312\002\033Google" - + "\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Cloud::A" - + "utoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.Geometry.getDescriptor(), - com.google.protobuf.DurationProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_descriptor, - new java.lang.String[] { - "BoundingBox", "Score", - }); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_descriptor, - new java.lang.String[] { - "InstanceId", "TimeOffset", "BoundingBox", "Score", - }); - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_descriptor, - new java.lang.String[] { - "IouThreshold", "MeanAveragePrecision", "ConfidenceMetricsEntries", - }); - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BoundingBoxMetricsEntry_ConfidenceMetricsEntry_descriptor, - new java.lang.String[] { - "ConfidenceThreshold", "Recall", "Precision", "F1Score", - }); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_descriptor, - new java.lang.String[] { - "EvaluatedBoundingBoxCount", - "BoundingBoxMetricsEntries", - "BoundingBoxMeanAveragePrecision", - }); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_descriptor, - new java.lang.String[] { - "EvaluatedFrameCount", - "EvaluatedBoundingBoxCount", - "BoundingBoxMetricsEntries", - "BoundingBoxMeanAveragePrecision", - }); - com.google.cloud.automl.v1beta1.Geometry.getDescriptor(); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Document.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Document.java deleted file mode 100644 index 5849bb023..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Document.java +++ /dev/null @@ -1,3702 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A structured text document e.g. a PDF.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Document} - */ -public final class Document extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Document) - DocumentOrBuilder { - private static final long serialVersionUID = 0L; - // Use Document.newBuilder() to construct. - private Document(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Document() { - layout_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Document(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Document( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DocumentInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.TextSnippet.Builder subBuilder = null; - if (documentText_ != null) { - subBuilder = documentText_.toBuilder(); - } - documentText_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSnippet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(documentText_); - documentText_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - layout_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - layout_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.Document.Layout.parser(), extensionRegistry)); - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.DocumentDimensions.Builder subBuilder = null; - if (documentDimensions_ != null) { - subBuilder = documentDimensions_.toBuilder(); - } - documentDimensions_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DocumentDimensions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(documentDimensions_); - documentDimensions_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - pageCount_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - layout_ = java.util.Collections.unmodifiableList(layout_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Document.class, - com.google.cloud.automl.v1beta1.Document.Builder.class); - } - - public interface LayoutOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Document.Layout) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Text Segment that represents a segment in
-     * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - * - * @return Whether the textSegment field is set. - */ - boolean hasTextSegment(); - /** - * - * - *
-     * Text Segment that represents a segment in
-     * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - * - * @return The textSegment. - */ - com.google.cloud.automl.v1beta1.TextSegment getTextSegment(); - /** - * - * - *
-     * Text Segment that represents a segment in
-     * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder getTextSegmentOrBuilder(); - - /** - * - * - *
-     * Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts
-     * from 1.
-     * 
- * - * int32 page_number = 2; - * - * @return The pageNumber. - */ - int getPageNumber(); - - /** - * - * - *
-     * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-     * Contains exactly 4
-     * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-     * and they are connected by edges in the order provided, which will
-     * represent a rectangle parallel to the frame. The
-     * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-     * relative to the page.
-     * Coordinates are based on top-left as point (0,0).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - * - * @return Whether the boundingPoly field is set. - */ - boolean hasBoundingPoly(); - /** - * - * - *
-     * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-     * Contains exactly 4
-     * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-     * and they are connected by edges in the order provided, which will
-     * represent a rectangle parallel to the frame. The
-     * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-     * relative to the page.
-     * Coordinates are based on top-left as point (0,0).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - * - * @return The boundingPoly. - */ - com.google.cloud.automl.v1beta1.BoundingPoly getBoundingPoly(); - /** - * - * - *
-     * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-     * Contains exactly 4
-     * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-     * and they are connected by edges in the order provided, which will
-     * represent a rectangle parallel to the frame. The
-     * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-     * relative to the page.
-     * Coordinates are based on top-left as point (0,0).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder(); - - /** - * - * - *
-     * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @return The enum numeric value on the wire for textSegmentType. - */ - int getTextSegmentTypeValue(); - /** - * - * - *
-     * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @return The textSegmentType. - */ - com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType getTextSegmentType(); - } - /** - * - * - *
-   * Describes the layout information of a [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the document.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Document.Layout} - */ - public static final class Layout extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Document.Layout) - LayoutOrBuilder { - private static final long serialVersionUID = 0L; - // Use Layout.newBuilder() to construct. - private Layout(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Layout() { - textSegmentType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Layout(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Layout( - 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.automl.v1beta1.TextSegment.Builder subBuilder = null; - if (textSegment_ != null) { - subBuilder = textSegment_.toBuilder(); - } - textSegment_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSegment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(textSegment_); - textSegment_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - pageNumber_ = input.readInt32(); - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingPoly_ != null) { - subBuilder = boundingPoly_.toBuilder(); - } - boundingPoly_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingPoly_); - boundingPoly_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - int rawValue = input.readEnum(); - - textSegmentType_ = 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.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_Layout_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_Layout_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Document.Layout.class, - com.google.cloud.automl.v1beta1.Document.Layout.Builder.class); - } - - /** - * - * - *
-     * The type of TextSegment in the context of the original document.
-     * 
- * - * Protobuf enum {@code google.cloud.automl.v1beta1.Document.Layout.TextSegmentType} - */ - public enum TextSegmentType implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Should not be used.
-       * 
- * - * TEXT_SEGMENT_TYPE_UNSPECIFIED = 0; - */ - TEXT_SEGMENT_TYPE_UNSPECIFIED(0), - /** - * - * - *
-       * The text segment is a token. e.g. word.
-       * 
- * - * TOKEN = 1; - */ - TOKEN(1), - /** - * - * - *
-       * The text segment is a paragraph.
-       * 
- * - * PARAGRAPH = 2; - */ - PARAGRAPH(2), - /** - * - * - *
-       * The text segment is a form field.
-       * 
- * - * FORM_FIELD = 3; - */ - FORM_FIELD(3), - /** - * - * - *
-       * The text segment is the name part of a form field. It will be treated
-       * as child of another FORM_FIELD TextSegment if its span is subspan of
-       * another TextSegment with type FORM_FIELD.
-       * 
- * - * FORM_FIELD_NAME = 4; - */ - FORM_FIELD_NAME(4), - /** - * - * - *
-       * The text segment is the text content part of a form field. It will be
-       * treated as child of another FORM_FIELD TextSegment if its span is
-       * subspan of another TextSegment with type FORM_FIELD.
-       * 
- * - * FORM_FIELD_CONTENTS = 5; - */ - FORM_FIELD_CONTENTS(5), - /** - * - * - *
-       * The text segment is a whole table, including headers, and all rows.
-       * 
- * - * TABLE = 6; - */ - TABLE(6), - /** - * - * - *
-       * The text segment is a table's headers. It will be treated as child of
-       * another TABLE TextSegment if its span is subspan of another TextSegment
-       * with type TABLE.
-       * 
- * - * TABLE_HEADER = 7; - */ - TABLE_HEADER(7), - /** - * - * - *
-       * The text segment is a row in table. It will be treated as child of
-       * another TABLE TextSegment if its span is subspan of another TextSegment
-       * with type TABLE.
-       * 
- * - * TABLE_ROW = 8; - */ - TABLE_ROW(8), - /** - * - * - *
-       * The text segment is a cell in table. It will be treated as child of
-       * another TABLE_ROW TextSegment if its span is subspan of another
-       * TextSegment with type TABLE_ROW.
-       * 
- * - * TABLE_CELL = 9; - */ - TABLE_CELL(9), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Should not be used.
-       * 
- * - * TEXT_SEGMENT_TYPE_UNSPECIFIED = 0; - */ - public static final int TEXT_SEGMENT_TYPE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * The text segment is a token. e.g. word.
-       * 
- * - * TOKEN = 1; - */ - public static final int TOKEN_VALUE = 1; - /** - * - * - *
-       * The text segment is a paragraph.
-       * 
- * - * PARAGRAPH = 2; - */ - public static final int PARAGRAPH_VALUE = 2; - /** - * - * - *
-       * The text segment is a form field.
-       * 
- * - * FORM_FIELD = 3; - */ - public static final int FORM_FIELD_VALUE = 3; - /** - * - * - *
-       * The text segment is the name part of a form field. It will be treated
-       * as child of another FORM_FIELD TextSegment if its span is subspan of
-       * another TextSegment with type FORM_FIELD.
-       * 
- * - * FORM_FIELD_NAME = 4; - */ - public static final int FORM_FIELD_NAME_VALUE = 4; - /** - * - * - *
-       * The text segment is the text content part of a form field. It will be
-       * treated as child of another FORM_FIELD TextSegment if its span is
-       * subspan of another TextSegment with type FORM_FIELD.
-       * 
- * - * FORM_FIELD_CONTENTS = 5; - */ - public static final int FORM_FIELD_CONTENTS_VALUE = 5; - /** - * - * - *
-       * The text segment is a whole table, including headers, and all rows.
-       * 
- * - * TABLE = 6; - */ - public static final int TABLE_VALUE = 6; - /** - * - * - *
-       * The text segment is a table's headers. It will be treated as child of
-       * another TABLE TextSegment if its span is subspan of another TextSegment
-       * with type TABLE.
-       * 
- * - * TABLE_HEADER = 7; - */ - public static final int TABLE_HEADER_VALUE = 7; - /** - * - * - *
-       * The text segment is a row in table. It will be treated as child of
-       * another TABLE TextSegment if its span is subspan of another TextSegment
-       * with type TABLE.
-       * 
- * - * TABLE_ROW = 8; - */ - public static final int TABLE_ROW_VALUE = 8; - /** - * - * - *
-       * The text segment is a cell in table. It will be treated as child of
-       * another TABLE_ROW TextSegment if its span is subspan of another
-       * TextSegment with type TABLE_ROW.
-       * 
- * - * TABLE_CELL = 9; - */ - public static final int TABLE_CELL_VALUE = 9; - - 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 TextSegmentType 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 TextSegmentType forNumber(int value) { - switch (value) { - case 0: - return TEXT_SEGMENT_TYPE_UNSPECIFIED; - case 1: - return TOKEN; - case 2: - return PARAGRAPH; - case 3: - return FORM_FIELD; - case 4: - return FORM_FIELD_NAME; - case 5: - return FORM_FIELD_CONTENTS; - case 6: - return TABLE; - case 7: - return TABLE_HEADER; - case 8: - return TABLE_ROW; - case 9: - return TABLE_CELL; - 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 TextSegmentType findValueByNumber(int number) { - return TextSegmentType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Document.Layout.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final TextSegmentType[] VALUES = values(); - - public static TextSegmentType 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 TextSegmentType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.automl.v1beta1.Document.Layout.TextSegmentType) - } - - public static final int TEXT_SEGMENT_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.TextSegment textSegment_; - /** - * - * - *
-     * Text Segment that represents a segment in
-     * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - * - * @return Whether the textSegment field is set. - */ - public boolean hasTextSegment() { - return textSegment_ != null; - } - /** - * - * - *
-     * Text Segment that represents a segment in
-     * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - * - * @return The textSegment. - */ - public com.google.cloud.automl.v1beta1.TextSegment getTextSegment() { - return textSegment_ == null - ? com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance() - : textSegment_; - } - /** - * - * - *
-     * Text Segment that represents a segment in
-     * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - public com.google.cloud.automl.v1beta1.TextSegmentOrBuilder getTextSegmentOrBuilder() { - return getTextSegment(); - } - - public static final int PAGE_NUMBER_FIELD_NUMBER = 2; - private int pageNumber_; - /** - * - * - *
-     * Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts
-     * from 1.
-     * 
- * - * int32 page_number = 2; - * - * @return The pageNumber. - */ - public int getPageNumber() { - return pageNumber_; - } - - public static final int BOUNDING_POLY_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.BoundingPoly boundingPoly_; - /** - * - * - *
-     * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-     * Contains exactly 4
-     * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-     * and they are connected by edges in the order provided, which will
-     * represent a rectangle parallel to the frame. The
-     * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-     * relative to the page.
-     * Coordinates are based on top-left as point (0,0).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - * - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPoly_ != null; - } - /** - * - * - *
-     * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-     * Contains exactly 4
-     * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-     * and they are connected by edges in the order provided, which will
-     * represent a rectangle parallel to the frame. The
-     * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-     * relative to the page.
-     * Coordinates are based on top-left as point (0,0).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - * - * @return The boundingPoly. - */ - public com.google.cloud.automl.v1beta1.BoundingPoly getBoundingPoly() { - return boundingPoly_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingPoly_; - } - /** - * - * - *
-     * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-     * Contains exactly 4
-     * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-     * and they are connected by edges in the order provided, which will
-     * represent a rectangle parallel to the frame. The
-     * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-     * relative to the page.
-     * Coordinates are based on top-left as point (0,0).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - public com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - return getBoundingPoly(); - } - - public static final int TEXT_SEGMENT_TYPE_FIELD_NUMBER = 4; - private int textSegmentType_; - /** - * - * - *
-     * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @return The enum numeric value on the wire for textSegmentType. - */ - public int getTextSegmentTypeValue() { - return textSegmentType_; - } - /** - * - * - *
-     * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @return The textSegmentType. - */ - public com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType getTextSegmentType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType result = - com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType.valueOf(textSegmentType_); - return result == null - ? com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType.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 (textSegment_ != null) { - output.writeMessage(1, getTextSegment()); - } - if (pageNumber_ != 0) { - output.writeInt32(2, pageNumber_); - } - if (boundingPoly_ != null) { - output.writeMessage(3, getBoundingPoly()); - } - if (textSegmentType_ - != com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType - .TEXT_SEGMENT_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, textSegmentType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (textSegment_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTextSegment()); - } - if (pageNumber_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageNumber_); - } - if (boundingPoly_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBoundingPoly()); - } - if (textSegmentType_ - != com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType - .TEXT_SEGMENT_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, textSegmentType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.Document.Layout)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Document.Layout other = - (com.google.cloud.automl.v1beta1.Document.Layout) obj; - - if (hasTextSegment() != other.hasTextSegment()) return false; - if (hasTextSegment()) { - if (!getTextSegment().equals(other.getTextSegment())) return false; - } - if (getPageNumber() != other.getPageNumber()) return false; - if (hasBoundingPoly() != other.hasBoundingPoly()) return false; - if (hasBoundingPoly()) { - if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; - } - if (textSegmentType_ != other.textSegmentType_) return false; - if (!unknownFields.equals(other.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 (hasTextSegment()) { - hash = (37 * hash) + TEXT_SEGMENT_FIELD_NUMBER; - hash = (53 * hash) + getTextSegment().hashCode(); - } - hash = (37 * hash) + PAGE_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getPageNumber(); - if (hasBoundingPoly()) { - hash = (37 * hash) + BOUNDING_POLY_FIELD_NUMBER; - hash = (53 * hash) + getBoundingPoly().hashCode(); - } - hash = (37 * hash) + TEXT_SEGMENT_TYPE_FIELD_NUMBER; - hash = (53 * hash) + textSegmentType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.Document.Layout prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 layout information of a [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the document.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Document.Layout} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Document.Layout) - com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_Layout_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_Layout_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Document.Layout.class, - com.google.cloud.automl.v1beta1.Document.Layout.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Document.Layout.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (textSegmentBuilder_ == null) { - textSegment_ = null; - } else { - textSegment_ = null; - textSegmentBuilder_ = null; - } - pageNumber_ = 0; - - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - textSegmentType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_Layout_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document.Layout getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Document.Layout.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document.Layout build() { - com.google.cloud.automl.v1beta1.Document.Layout result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document.Layout buildPartial() { - com.google.cloud.automl.v1beta1.Document.Layout result = - new com.google.cloud.automl.v1beta1.Document.Layout(this); - if (textSegmentBuilder_ == null) { - result.textSegment_ = textSegment_; - } else { - result.textSegment_ = textSegmentBuilder_.build(); - } - result.pageNumber_ = pageNumber_; - if (boundingPolyBuilder_ == null) { - result.boundingPoly_ = boundingPoly_; - } else { - result.boundingPoly_ = boundingPolyBuilder_.build(); - } - result.textSegmentType_ = textSegmentType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Document.Layout) { - return mergeFrom((com.google.cloud.automl.v1beta1.Document.Layout) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Document.Layout other) { - if (other == com.google.cloud.automl.v1beta1.Document.Layout.getDefaultInstance()) - return this; - if (other.hasTextSegment()) { - mergeTextSegment(other.getTextSegment()); - } - if (other.getPageNumber() != 0) { - setPageNumber(other.getPageNumber()); - } - if (other.hasBoundingPoly()) { - mergeBoundingPoly(other.getBoundingPoly()); - } - if (other.textSegmentType_ != 0) { - setTextSegmentTypeValue(other.getTextSegmentTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Document.Layout parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.Document.Layout) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.TextSegment textSegment_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSegment, - com.google.cloud.automl.v1beta1.TextSegment.Builder, - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder> - textSegmentBuilder_; - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - * - * @return Whether the textSegment field is set. - */ - public boolean hasTextSegment() { - return textSegmentBuilder_ != null || textSegment_ != null; - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - * - * @return The textSegment. - */ - public com.google.cloud.automl.v1beta1.TextSegment getTextSegment() { - if (textSegmentBuilder_ == null) { - return textSegment_ == null - ? com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance() - : textSegment_; - } else { - return textSegmentBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - public Builder setTextSegment(com.google.cloud.automl.v1beta1.TextSegment value) { - if (textSegmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - textSegment_ = value; - onChanged(); - } else { - textSegmentBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - public Builder setTextSegment( - com.google.cloud.automl.v1beta1.TextSegment.Builder builderForValue) { - if (textSegmentBuilder_ == null) { - textSegment_ = builderForValue.build(); - onChanged(); - } else { - textSegmentBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - public Builder mergeTextSegment(com.google.cloud.automl.v1beta1.TextSegment value) { - if (textSegmentBuilder_ == null) { - if (textSegment_ != null) { - textSegment_ = - com.google.cloud.automl.v1beta1.TextSegment.newBuilder(textSegment_) - .mergeFrom(value) - .buildPartial(); - } else { - textSegment_ = value; - } - onChanged(); - } else { - textSegmentBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - public Builder clearTextSegment() { - if (textSegmentBuilder_ == null) { - textSegment_ = null; - onChanged(); - } else { - textSegment_ = null; - textSegmentBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - public com.google.cloud.automl.v1beta1.TextSegment.Builder getTextSegmentBuilder() { - - onChanged(); - return getTextSegmentFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - public com.google.cloud.automl.v1beta1.TextSegmentOrBuilder getTextSegmentOrBuilder() { - if (textSegmentBuilder_ != null) { - return textSegmentBuilder_.getMessageOrBuilder(); - } else { - return textSegment_ == null - ? com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance() - : textSegment_; - } - } - /** - * - * - *
-       * Text Segment that represents a segment in
-       * [document_text][google.cloud.automl.v1beta1.Document.document_text].
-       * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSegment, - com.google.cloud.automl.v1beta1.TextSegment.Builder, - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder> - getTextSegmentFieldBuilder() { - if (textSegmentBuilder_ == null) { - textSegmentBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSegment, - com.google.cloud.automl.v1beta1.TextSegment.Builder, - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder>( - getTextSegment(), getParentForChildren(), isClean()); - textSegment_ = null; - } - return textSegmentBuilder_; - } - - private int pageNumber_; - /** - * - * - *
-       * Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts
-       * from 1.
-       * 
- * - * int32 page_number = 2; - * - * @return The pageNumber. - */ - public int getPageNumber() { - return pageNumber_; - } - /** - * - * - *
-       * Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts
-       * from 1.
-       * 
- * - * int32 page_number = 2; - * - * @param value The pageNumber to set. - * @return This builder for chaining. - */ - public Builder setPageNumber(int value) { - - pageNumber_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts
-       * from 1.
-       * 
- * - * int32 page_number = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageNumber() { - - pageNumber_ = 0; - onChanged(); - return this; - } - - private com.google.cloud.automl.v1beta1.BoundingPoly boundingPoly_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder> - boundingPolyBuilder_; - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - * - * @return Whether the boundingPoly field is set. - */ - public boolean hasBoundingPoly() { - return boundingPolyBuilder_ != null || boundingPoly_ != null; - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - * - * @return The boundingPoly. - */ - public com.google.cloud.automl.v1beta1.BoundingPoly getBoundingPoly() { - if (boundingPolyBuilder_ == null) { - return boundingPoly_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingPoly_; - } else { - return boundingPolyBuilder_.getMessage(); - } - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - public Builder setBoundingPoly(com.google.cloud.automl.v1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingPoly_ = value; - onChanged(); - } else { - boundingPolyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - public Builder setBoundingPoly( - com.google.cloud.automl.v1beta1.BoundingPoly.Builder builderForValue) { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = builderForValue.build(); - onChanged(); - } else { - boundingPolyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - public Builder mergeBoundingPoly(com.google.cloud.automl.v1beta1.BoundingPoly value) { - if (boundingPolyBuilder_ == null) { - if (boundingPoly_ != null) { - boundingPoly_ = - com.google.cloud.automl.v1beta1.BoundingPoly.newBuilder(boundingPoly_) - .mergeFrom(value) - .buildPartial(); - } else { - boundingPoly_ = value; - } - onChanged(); - } else { - boundingPolyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - public Builder clearBoundingPoly() { - if (boundingPolyBuilder_ == null) { - boundingPoly_ = null; - onChanged(); - } else { - boundingPoly_ = null; - boundingPolyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - public com.google.cloud.automl.v1beta1.BoundingPoly.Builder getBoundingPolyBuilder() { - - onChanged(); - return getBoundingPolyFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - public com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingPolyOrBuilder() { - if (boundingPolyBuilder_ != null) { - return boundingPolyBuilder_.getMessageOrBuilder(); - } else { - return boundingPoly_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingPoly_; - } - } - /** - * - * - *
-       * The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page.
-       * Contains exactly 4
-       * [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices]
-       * and they are connected by edges in the order provided, which will
-       * represent a rectangle parallel to the frame. The
-       * [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are
-       * relative to the page.
-       * Coordinates are based on top-left as point (0,0).
-       * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_poly = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder> - getBoundingPolyFieldBuilder() { - if (boundingPolyBuilder_ == null) { - boundingPolyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder>( - getBoundingPoly(), getParentForChildren(), isClean()); - boundingPoly_ = null; - } - return boundingPolyBuilder_; - } - - private int textSegmentType_ = 0; - /** - * - * - *
-       * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-       * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @return The enum numeric value on the wire for textSegmentType. - */ - public int getTextSegmentTypeValue() { - return textSegmentType_; - } - /** - * - * - *
-       * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-       * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @param value The enum numeric value on the wire for textSegmentType to set. - * @return This builder for chaining. - */ - public Builder setTextSegmentTypeValue(int value) { - textSegmentType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-       * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @return The textSegmentType. - */ - public com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType getTextSegmentType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType result = - com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType.valueOf( - textSegmentType_); - return result == null - ? com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-       * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @param value The textSegmentType to set. - * @return This builder for chaining. - */ - public Builder setTextSegmentType( - com.google.cloud.automl.v1beta1.Document.Layout.TextSegmentType value) { - if (value == null) { - throw new NullPointerException(); - } - - textSegmentType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document.
-       * 
- * - * .google.cloud.automl.v1beta1.Document.Layout.TextSegmentType text_segment_type = 4; - * - * - * @return This builder for chaining. - */ - public Builder clearTextSegmentType() { - - textSegmentType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Document.Layout) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Document.Layout) - private static final com.google.cloud.automl.v1beta1.Document.Layout DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Document.Layout(); - } - - public static com.google.cloud.automl.v1beta1.Document.Layout getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Layout parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Layout(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document.Layout getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.DocumentInputConfig inputConfig_; - /** - * - * - *
-   * An input config specifying the content of the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - * - * - *
-   * An input config specifying the content of the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.DocumentInputConfig getInputConfig() { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.DocumentInputConfig.getDefaultInstance() - : inputConfig_; - } - /** - * - * - *
-   * An input config specifying the content of the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - public com.google.cloud.automl.v1beta1.DocumentInputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - public static final int DOCUMENT_TEXT_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.TextSnippet documentText_; - /** - * - * - *
-   * The plain text version of this document.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - * - * @return Whether the documentText field is set. - */ - public boolean hasDocumentText() { - return documentText_ != null; - } - /** - * - * - *
-   * The plain text version of this document.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - * - * @return The documentText. - */ - public com.google.cloud.automl.v1beta1.TextSnippet getDocumentText() { - return documentText_ == null - ? com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance() - : documentText_; - } - /** - * - * - *
-   * The plain text version of this document.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - public com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getDocumentTextOrBuilder() { - return getDocumentText(); - } - - public static final int LAYOUT_FIELD_NUMBER = 3; - private java.util.List layout_; - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public java.util.List getLayoutList() { - return layout_; - } - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public java.util.List - getLayoutOrBuilderList() { - return layout_; - } - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public int getLayoutCount() { - return layout_.size(); - } - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public com.google.cloud.automl.v1beta1.Document.Layout getLayout(int index) { - return layout_.get(index); - } - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder getLayoutOrBuilder(int index) { - return layout_.get(index); - } - - public static final int DOCUMENT_DIMENSIONS_FIELD_NUMBER = 4; - private com.google.cloud.automl.v1beta1.DocumentDimensions documentDimensions_; - /** - * - * - *
-   * The dimensions of the page in the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - * - * @return Whether the documentDimensions field is set. - */ - public boolean hasDocumentDimensions() { - return documentDimensions_ != null; - } - /** - * - * - *
-   * The dimensions of the page in the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - * - * @return The documentDimensions. - */ - public com.google.cloud.automl.v1beta1.DocumentDimensions getDocumentDimensions() { - return documentDimensions_ == null - ? com.google.cloud.automl.v1beta1.DocumentDimensions.getDefaultInstance() - : documentDimensions_; - } - /** - * - * - *
-   * The dimensions of the page in the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - public com.google.cloud.automl.v1beta1.DocumentDimensionsOrBuilder - getDocumentDimensionsOrBuilder() { - return getDocumentDimensions(); - } - - public static final int PAGE_COUNT_FIELD_NUMBER = 5; - private int pageCount_; - /** - * - * - *
-   * Number of pages in the document.
-   * 
- * - * int32 page_count = 5; - * - * @return The pageCount. - */ - public int getPageCount() { - return pageCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (inputConfig_ != null) { - output.writeMessage(1, getInputConfig()); - } - if (documentText_ != null) { - output.writeMessage(2, getDocumentText()); - } - for (int i = 0; i < layout_.size(); i++) { - output.writeMessage(3, layout_.get(i)); - } - if (documentDimensions_ != null) { - output.writeMessage(4, getDocumentDimensions()); - } - if (pageCount_ != 0) { - output.writeInt32(5, pageCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInputConfig()); - } - if (documentText_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDocumentText()); - } - for (int i = 0; i < layout_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, layout_.get(i)); - } - if (documentDimensions_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDocumentDimensions()); - } - if (pageCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, pageCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.Document)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Document other = (com.google.cloud.automl.v1beta1.Document) obj; - - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig().equals(other.getInputConfig())) return false; - } - if (hasDocumentText() != other.hasDocumentText()) return false; - if (hasDocumentText()) { - if (!getDocumentText().equals(other.getDocumentText())) return false; - } - if (!getLayoutList().equals(other.getLayoutList())) return false; - if (hasDocumentDimensions() != other.hasDocumentDimensions()) return false; - if (hasDocumentDimensions()) { - if (!getDocumentDimensions().equals(other.getDocumentDimensions())) return false; - } - if (getPageCount() != other.getPageCount()) return false; - if (!unknownFields.equals(other.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 (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - if (hasDocumentText()) { - hash = (37 * hash) + DOCUMENT_TEXT_FIELD_NUMBER; - hash = (53 * hash) + getDocumentText().hashCode(); - } - if (getLayoutCount() > 0) { - hash = (37 * hash) + LAYOUT_FIELD_NUMBER; - hash = (53 * hash) + getLayoutList().hashCode(); - } - if (hasDocumentDimensions()) { - hash = (37 * hash) + DOCUMENT_DIMENSIONS_FIELD_NUMBER; - hash = (53 * hash) + getDocumentDimensions().hashCode(); - } - hash = (37 * hash) + PAGE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getPageCount(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Document parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Document parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.Document prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 structured text document e.g. a PDF.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Document} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Document) - com.google.cloud.automl.v1beta1.DocumentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Document.class, - com.google.cloud.automl.v1beta1.Document.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Document.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLayoutFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - if (documentTextBuilder_ == null) { - documentText_ = null; - } else { - documentText_ = null; - documentTextBuilder_ = null; - } - if (layoutBuilder_ == null) { - layout_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - layoutBuilder_.clear(); - } - if (documentDimensionsBuilder_ == null) { - documentDimensions_ = null; - } else { - documentDimensions_ = null; - documentDimensionsBuilder_ = null; - } - pageCount_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Document_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Document.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document build() { - com.google.cloud.automl.v1beta1.Document result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document buildPartial() { - com.google.cloud.automl.v1beta1.Document result = - new com.google.cloud.automl.v1beta1.Document(this); - int from_bitField0_ = bitField0_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - if (documentTextBuilder_ == null) { - result.documentText_ = documentText_; - } else { - result.documentText_ = documentTextBuilder_.build(); - } - if (layoutBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - layout_ = java.util.Collections.unmodifiableList(layout_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.layout_ = layout_; - } else { - result.layout_ = layoutBuilder_.build(); - } - if (documentDimensionsBuilder_ == null) { - result.documentDimensions_ = documentDimensions_; - } else { - result.documentDimensions_ = documentDimensionsBuilder_.build(); - } - result.pageCount_ = pageCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Document) { - return mergeFrom((com.google.cloud.automl.v1beta1.Document) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Document other) { - if (other == com.google.cloud.automl.v1beta1.Document.getDefaultInstance()) return this; - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - if (other.hasDocumentText()) { - mergeDocumentText(other.getDocumentText()); - } - if (layoutBuilder_ == null) { - if (!other.layout_.isEmpty()) { - if (layout_.isEmpty()) { - layout_ = other.layout_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureLayoutIsMutable(); - layout_.addAll(other.layout_); - } - onChanged(); - } - } else { - if (!other.layout_.isEmpty()) { - if (layoutBuilder_.isEmpty()) { - layoutBuilder_.dispose(); - layoutBuilder_ = null; - layout_ = other.layout_; - bitField0_ = (bitField0_ & ~0x00000001); - layoutBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getLayoutFieldBuilder() - : null; - } else { - layoutBuilder_.addAllMessages(other.layout_); - } - } - } - if (other.hasDocumentDimensions()) { - mergeDocumentDimensions(other.getDocumentDimensions()); - } - if (other.getPageCount() != 0) { - setPageCount(other.getPageCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Document parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.Document) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.cloud.automl.v1beta1.DocumentInputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DocumentInputConfig, - com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder, - com.google.cloud.automl.v1beta1.DocumentInputConfigOrBuilder> - inputConfigBuilder_; - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.DocumentInputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.DocumentInputConfig.getDefaultInstance() - : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - public Builder setInputConfig(com.google.cloud.automl.v1beta1.DocumentInputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - public Builder setInputConfig( - com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - public Builder mergeInputConfig(com.google.cloud.automl.v1beta1.DocumentInputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.automl.v1beta1.DocumentInputConfig.newBuilder(inputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - public com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - public com.google.cloud.automl.v1beta1.DocumentInputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.DocumentInputConfig.getDefaultInstance() - : inputConfig_; - } - } - /** - * - * - *
-     * An input config specifying the content of the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DocumentInputConfig, - com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder, - com.google.cloud.automl.v1beta1.DocumentInputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DocumentInputConfig, - com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder, - com.google.cloud.automl.v1beta1.DocumentInputConfigOrBuilder>( - getInputConfig(), getParentForChildren(), isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - private com.google.cloud.automl.v1beta1.TextSnippet documentText_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder> - documentTextBuilder_; - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - * - * @return Whether the documentText field is set. - */ - public boolean hasDocumentText() { - return documentTextBuilder_ != null || documentText_ != null; - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - * - * @return The documentText. - */ - public com.google.cloud.automl.v1beta1.TextSnippet getDocumentText() { - if (documentTextBuilder_ == null) { - return documentText_ == null - ? com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance() - : documentText_; - } else { - return documentTextBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - public Builder setDocumentText(com.google.cloud.automl.v1beta1.TextSnippet value) { - if (documentTextBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - documentText_ = value; - onChanged(); - } else { - documentTextBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - public Builder setDocumentText( - com.google.cloud.automl.v1beta1.TextSnippet.Builder builderForValue) { - if (documentTextBuilder_ == null) { - documentText_ = builderForValue.build(); - onChanged(); - } else { - documentTextBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - public Builder mergeDocumentText(com.google.cloud.automl.v1beta1.TextSnippet value) { - if (documentTextBuilder_ == null) { - if (documentText_ != null) { - documentText_ = - com.google.cloud.automl.v1beta1.TextSnippet.newBuilder(documentText_) - .mergeFrom(value) - .buildPartial(); - } else { - documentText_ = value; - } - onChanged(); - } else { - documentTextBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - public Builder clearDocumentText() { - if (documentTextBuilder_ == null) { - documentText_ = null; - onChanged(); - } else { - documentText_ = null; - documentTextBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - public com.google.cloud.automl.v1beta1.TextSnippet.Builder getDocumentTextBuilder() { - - onChanged(); - return getDocumentTextFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - public com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getDocumentTextOrBuilder() { - if (documentTextBuilder_ != null) { - return documentTextBuilder_.getMessageOrBuilder(); - } else { - return documentText_ == null - ? com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance() - : documentText_; - } - } - /** - * - * - *
-     * The plain text version of this document.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder> - getDocumentTextFieldBuilder() { - if (documentTextBuilder_ == null) { - documentTextBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder>( - getDocumentText(), getParentForChildren(), isClean()); - documentText_ = null; - } - return documentTextBuilder_; - } - - private java.util.List layout_ = - java.util.Collections.emptyList(); - - private void ensureLayoutIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - layout_ = new java.util.ArrayList(layout_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Document.Layout, - com.google.cloud.automl.v1beta1.Document.Layout.Builder, - com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder> - layoutBuilder_; - - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public java.util.List getLayoutList() { - if (layoutBuilder_ == null) { - return java.util.Collections.unmodifiableList(layout_); - } else { - return layoutBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public int getLayoutCount() { - if (layoutBuilder_ == null) { - return layout_.size(); - } else { - return layoutBuilder_.getCount(); - } - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public com.google.cloud.automl.v1beta1.Document.Layout getLayout(int index) { - if (layoutBuilder_ == null) { - return layout_.get(index); - } else { - return layoutBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder setLayout(int index, com.google.cloud.automl.v1beta1.Document.Layout value) { - if (layoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayoutIsMutable(); - layout_.set(index, value); - onChanged(); - } else { - layoutBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder setLayout( - int index, com.google.cloud.automl.v1beta1.Document.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - ensureLayoutIsMutable(); - layout_.set(index, builderForValue.build()); - onChanged(); - } else { - layoutBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder addLayout(com.google.cloud.automl.v1beta1.Document.Layout value) { - if (layoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayoutIsMutable(); - layout_.add(value); - onChanged(); - } else { - layoutBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder addLayout(int index, com.google.cloud.automl.v1beta1.Document.Layout value) { - if (layoutBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLayoutIsMutable(); - layout_.add(index, value); - onChanged(); - } else { - layoutBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder addLayout( - com.google.cloud.automl.v1beta1.Document.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - ensureLayoutIsMutable(); - layout_.add(builderForValue.build()); - onChanged(); - } else { - layoutBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder addLayout( - int index, com.google.cloud.automl.v1beta1.Document.Layout.Builder builderForValue) { - if (layoutBuilder_ == null) { - ensureLayoutIsMutable(); - layout_.add(index, builderForValue.build()); - onChanged(); - } else { - layoutBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder addAllLayout( - java.lang.Iterable values) { - if (layoutBuilder_ == null) { - ensureLayoutIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, layout_); - onChanged(); - } else { - layoutBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder clearLayout() { - if (layoutBuilder_ == null) { - layout_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - layoutBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public Builder removeLayout(int index) { - if (layoutBuilder_ == null) { - ensureLayoutIsMutable(); - layout_.remove(index); - onChanged(); - } else { - layoutBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public com.google.cloud.automl.v1beta1.Document.Layout.Builder getLayoutBuilder(int index) { - return getLayoutFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder getLayoutOrBuilder(int index) { - if (layoutBuilder_ == null) { - return layout_.get(index); - } else { - return layoutBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public java.util.List - getLayoutOrBuilderList() { - if (layoutBuilder_ != null) { - return layoutBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(layout_); - } - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public com.google.cloud.automl.v1beta1.Document.Layout.Builder addLayoutBuilder() { - return getLayoutFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.Document.Layout.getDefaultInstance()); - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public com.google.cloud.automl.v1beta1.Document.Layout.Builder addLayoutBuilder(int index) { - return getLayoutFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.Document.Layout.getDefaultInstance()); - } - /** - * - * - *
-     * Describes the layout of the document.
-     * Sorted by [page_number][].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - public java.util.List - getLayoutBuilderList() { - return getLayoutFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Document.Layout, - com.google.cloud.automl.v1beta1.Document.Layout.Builder, - com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder> - getLayoutFieldBuilder() { - if (layoutBuilder_ == null) { - layoutBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Document.Layout, - com.google.cloud.automl.v1beta1.Document.Layout.Builder, - com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder>( - layout_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - layout_ = null; - } - return layoutBuilder_; - } - - private com.google.cloud.automl.v1beta1.DocumentDimensions documentDimensions_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DocumentDimensions, - com.google.cloud.automl.v1beta1.DocumentDimensions.Builder, - com.google.cloud.automl.v1beta1.DocumentDimensionsOrBuilder> - documentDimensionsBuilder_; - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - * - * @return Whether the documentDimensions field is set. - */ - public boolean hasDocumentDimensions() { - return documentDimensionsBuilder_ != null || documentDimensions_ != null; - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - * - * @return The documentDimensions. - */ - public com.google.cloud.automl.v1beta1.DocumentDimensions getDocumentDimensions() { - if (documentDimensionsBuilder_ == null) { - return documentDimensions_ == null - ? com.google.cloud.automl.v1beta1.DocumentDimensions.getDefaultInstance() - : documentDimensions_; - } else { - return documentDimensionsBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - public Builder setDocumentDimensions(com.google.cloud.automl.v1beta1.DocumentDimensions value) { - if (documentDimensionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - documentDimensions_ = value; - onChanged(); - } else { - documentDimensionsBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - public Builder setDocumentDimensions( - com.google.cloud.automl.v1beta1.DocumentDimensions.Builder builderForValue) { - if (documentDimensionsBuilder_ == null) { - documentDimensions_ = builderForValue.build(); - onChanged(); - } else { - documentDimensionsBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - public Builder mergeDocumentDimensions( - com.google.cloud.automl.v1beta1.DocumentDimensions value) { - if (documentDimensionsBuilder_ == null) { - if (documentDimensions_ != null) { - documentDimensions_ = - com.google.cloud.automl.v1beta1.DocumentDimensions.newBuilder(documentDimensions_) - .mergeFrom(value) - .buildPartial(); - } else { - documentDimensions_ = value; - } - onChanged(); - } else { - documentDimensionsBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - public Builder clearDocumentDimensions() { - if (documentDimensionsBuilder_ == null) { - documentDimensions_ = null; - onChanged(); - } else { - documentDimensions_ = null; - documentDimensionsBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - public com.google.cloud.automl.v1beta1.DocumentDimensions.Builder - getDocumentDimensionsBuilder() { - - onChanged(); - return getDocumentDimensionsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - public com.google.cloud.automl.v1beta1.DocumentDimensionsOrBuilder - getDocumentDimensionsOrBuilder() { - if (documentDimensionsBuilder_ != null) { - return documentDimensionsBuilder_.getMessageOrBuilder(); - } else { - return documentDimensions_ == null - ? com.google.cloud.automl.v1beta1.DocumentDimensions.getDefaultInstance() - : documentDimensions_; - } - } - /** - * - * - *
-     * The dimensions of the page in the document.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DocumentDimensions, - com.google.cloud.automl.v1beta1.DocumentDimensions.Builder, - com.google.cloud.automl.v1beta1.DocumentDimensionsOrBuilder> - getDocumentDimensionsFieldBuilder() { - if (documentDimensionsBuilder_ == null) { - documentDimensionsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DocumentDimensions, - com.google.cloud.automl.v1beta1.DocumentDimensions.Builder, - com.google.cloud.automl.v1beta1.DocumentDimensionsOrBuilder>( - getDocumentDimensions(), getParentForChildren(), isClean()); - documentDimensions_ = null; - } - return documentDimensionsBuilder_; - } - - private int pageCount_; - /** - * - * - *
-     * Number of pages in the document.
-     * 
- * - * int32 page_count = 5; - * - * @return The pageCount. - */ - public int getPageCount() { - return pageCount_; - } - /** - * - * - *
-     * Number of pages in the document.
-     * 
- * - * int32 page_count = 5; - * - * @param value The pageCount to set. - * @return This builder for chaining. - */ - public Builder setPageCount(int value) { - - pageCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Number of pages in the document.
-     * 
- * - * int32 page_count = 5; - * - * @return This builder for chaining. - */ - public Builder clearPageCount() { - - pageCount_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Document) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Document) - private static final com.google.cloud.automl.v1beta1.Document DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Document(); - } - - public static com.google.cloud.automl.v1beta1.Document getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Document parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Document(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Document getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensions.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensions.java deleted file mode 100644 index 4596fa055..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensions.java +++ /dev/null @@ -1,971 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Message that describes dimension of a document.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DocumentDimensions} - */ -public final class DocumentDimensions extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.DocumentDimensions) - DocumentDimensionsOrBuilder { - private static final long serialVersionUID = 0L; - // Use DocumentDimensions.newBuilder() to construct. - private DocumentDimensions(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DocumentDimensions() { - unit_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DocumentDimensions(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DocumentDimensions( - 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(); - - unit_ = rawValue; - break; - } - case 21: - { - width_ = input.readFloat(); - break; - } - case 29: - { - height_ = 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.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_DocumentDimensions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_DocumentDimensions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DocumentDimensions.class, - com.google.cloud.automl.v1beta1.DocumentDimensions.Builder.class); - } - - /** - * - * - *
-   * Unit of the document dimension.
-   * 
- * - * Protobuf enum {@code google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit} - */ - public enum DocumentDimensionUnit implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Should not be used.
-     * 
- * - * DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0; - */ - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED(0), - /** - * - * - *
-     * Document dimension is measured in inches.
-     * 
- * - * INCH = 1; - */ - INCH(1), - /** - * - * - *
-     * Document dimension is measured in centimeters.
-     * 
- * - * CENTIMETER = 2; - */ - CENTIMETER(2), - /** - * - * - *
-     * Document dimension is measured in points. 72 points = 1 inch.
-     * 
- * - * POINT = 3; - */ - POINT(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Should not be used.
-     * 
- * - * DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0; - */ - public static final int DOCUMENT_DIMENSION_UNIT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Document dimension is measured in inches.
-     * 
- * - * INCH = 1; - */ - public static final int INCH_VALUE = 1; - /** - * - * - *
-     * Document dimension is measured in centimeters.
-     * 
- * - * CENTIMETER = 2; - */ - public static final int CENTIMETER_VALUE = 2; - /** - * - * - *
-     * Document dimension is measured in points. 72 points = 1 inch.
-     * 
- * - * POINT = 3; - */ - public static final int POINT_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 DocumentDimensionUnit 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 DocumentDimensionUnit forNumber(int value) { - switch (value) { - case 0: - return DOCUMENT_DIMENSION_UNIT_UNSPECIFIED; - case 1: - return INCH; - case 2: - return CENTIMETER; - case 3: - return POINT; - 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 DocumentDimensionUnit findValueByNumber(int number) { - return DocumentDimensionUnit.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DocumentDimensions.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final DocumentDimensionUnit[] VALUES = values(); - - public static DocumentDimensionUnit 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 DocumentDimensionUnit(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit) - } - - public static final int UNIT_FIELD_NUMBER = 1; - private int unit_; - /** - * - * - *
-   * Unit of the dimension.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @return The enum numeric value on the wire for unit. - */ - public int getUnitValue() { - return unit_; - } - /** - * - * - *
-   * Unit of the dimension.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @return The unit. - */ - public com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit getUnit() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit result = - com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit.valueOf(unit_); - return result == null - ? com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit.UNRECOGNIZED - : result; - } - - public static final int WIDTH_FIELD_NUMBER = 2; - private float width_; - /** - * - * - *
-   * Width value of the document, works together with the unit.
-   * 
- * - * float width = 2; - * - * @return The width. - */ - public float getWidth() { - return width_; - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private float height_; - /** - * - * - *
-   * Height value of the document, works together with the unit.
-   * 
- * - * float height = 3; - * - * @return The height. - */ - public float getHeight() { - return height_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (unit_ - != com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit - .DOCUMENT_DIMENSION_UNIT_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, unit_); - } - if (width_ != 0F) { - output.writeFloat(2, width_); - } - if (height_ != 0F) { - output.writeFloat(3, height_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (unit_ - != com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit - .DOCUMENT_DIMENSION_UNIT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, unit_); - } - if (width_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, width_); - } - if (height_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, height_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DocumentDimensions)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DocumentDimensions other = - (com.google.cloud.automl.v1beta1.DocumentDimensions) obj; - - if (unit_ != other.unit_) return false; - if (java.lang.Float.floatToIntBits(getWidth()) - != java.lang.Float.floatToIntBits(other.getWidth())) return false; - if (java.lang.Float.floatToIntBits(getHeight()) - != java.lang.Float.floatToIntBits(other.getHeight())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + UNIT_FIELD_NUMBER; - hash = (53 * hash) + unit_; - hash = (37 * hash) + WIDTH_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getWidth()); - hash = (37 * hash) + HEIGHT_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeight()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.DocumentDimensions prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Message that describes dimension of a document.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DocumentDimensions} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DocumentDimensions) - com.google.cloud.automl.v1beta1.DocumentDimensionsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_DocumentDimensions_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_DocumentDimensions_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DocumentDimensions.class, - com.google.cloud.automl.v1beta1.DocumentDimensions.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DocumentDimensions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - unit_ = 0; - - width_ = 0F; - - height_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_DocumentDimensions_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentDimensions getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DocumentDimensions.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentDimensions build() { - com.google.cloud.automl.v1beta1.DocumentDimensions result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentDimensions buildPartial() { - com.google.cloud.automl.v1beta1.DocumentDimensions result = - new com.google.cloud.automl.v1beta1.DocumentDimensions(this); - result.unit_ = unit_; - result.width_ = width_; - result.height_ = height_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DocumentDimensions) { - return mergeFrom((com.google.cloud.automl.v1beta1.DocumentDimensions) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DocumentDimensions other) { - if (other == com.google.cloud.automl.v1beta1.DocumentDimensions.getDefaultInstance()) - return this; - if (other.unit_ != 0) { - setUnitValue(other.getUnitValue()); - } - if (other.getWidth() != 0F) { - setWidth(other.getWidth()); - } - if (other.getHeight() != 0F) { - setHeight(other.getHeight()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DocumentDimensions parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.DocumentDimensions) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int unit_ = 0; - /** - * - * - *
-     * Unit of the dimension.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @return The enum numeric value on the wire for unit. - */ - public int getUnitValue() { - return unit_; - } - /** - * - * - *
-     * Unit of the dimension.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @param value The enum numeric value on the wire for unit to set. - * @return This builder for chaining. - */ - public Builder setUnitValue(int value) { - unit_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Unit of the dimension.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @return The unit. - */ - public com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit getUnit() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit result = - com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit.valueOf(unit_); - return result == null - ? com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Unit of the dimension.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @param value The unit to set. - * @return This builder for chaining. - */ - public Builder setUnit( - com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit value) { - if (value == null) { - throw new NullPointerException(); - } - - unit_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Unit of the dimension.
-     * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @return This builder for chaining. - */ - public Builder clearUnit() { - - unit_ = 0; - onChanged(); - return this; - } - - private float width_; - /** - * - * - *
-     * Width value of the document, works together with the unit.
-     * 
- * - * float width = 2; - * - * @return The width. - */ - public float getWidth() { - return width_; - } - /** - * - * - *
-     * Width value of the document, works together with the unit.
-     * 
- * - * float width = 2; - * - * @param value The width to set. - * @return This builder for chaining. - */ - public Builder setWidth(float value) { - - width_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Width value of the document, works together with the unit.
-     * 
- * - * float width = 2; - * - * @return This builder for chaining. - */ - public Builder clearWidth() { - - width_ = 0F; - onChanged(); - return this; - } - - private float height_; - /** - * - * - *
-     * Height value of the document, works together with the unit.
-     * 
- * - * float height = 3; - * - * @return The height. - */ - public float getHeight() { - return height_; - } - /** - * - * - *
-     * Height value of the document, works together with the unit.
-     * 
- * - * float height = 3; - * - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(float value) { - - height_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Height value of the document, works together with the unit.
-     * 
- * - * float height = 3; - * - * @return This builder for chaining. - */ - public Builder clearHeight() { - - height_ = 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.automl.v1beta1.DocumentDimensions) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DocumentDimensions) - private static final com.google.cloud.automl.v1beta1.DocumentDimensions DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DocumentDimensions(); - } - - public static com.google.cloud.automl.v1beta1.DocumentDimensions getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentDimensions parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DocumentDimensions(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentDimensions getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensionsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensionsOrBuilder.java deleted file mode 100644 index a243f1d18..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentDimensionsOrBuilder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -public interface DocumentDimensionsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DocumentDimensions) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Unit of the dimension.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @return The enum numeric value on the wire for unit. - */ - int getUnitValue(); - /** - * - * - *
-   * Unit of the dimension.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit unit = 1; - * - * @return The unit. - */ - com.google.cloud.automl.v1beta1.DocumentDimensions.DocumentDimensionUnit getUnit(); - - /** - * - * - *
-   * Width value of the document, works together with the unit.
-   * 
- * - * float width = 2; - * - * @return The width. - */ - float getWidth(); - - /** - * - * - *
-   * Height value of the document, works together with the unit.
-   * 
- * - * float height = 3; - * - * @return The height. - */ - float getHeight(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfig.java deleted file mode 100644 index 07fc91fd6..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfig.java +++ /dev/null @@ -1,766 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Input configuration of a [Document][google.cloud.automl.v1beta1.Document].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DocumentInputConfig} - */ -public final class DocumentInputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.DocumentInputConfig) - DocumentInputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use DocumentInputConfig.newBuilder() to construct. - private DocumentInputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DocumentInputConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DocumentInputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DocumentInputConfig( - 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.automl.v1beta1.GcsSource.Builder subBuilder = null; - if (gcsSource_ != null) { - subBuilder = gcsSource_.toBuilder(); - } - gcsSource_ = - input.readMessage( - com.google.cloud.automl.v1beta1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gcsSource_); - gcsSource_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DocumentInputConfig.class, - com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder.class); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.GcsSource gcsSource_; - /** - * - * - *
-   * The Google Cloud Storage location of the document file. Only a single path
-   * should be given.
-   * Max supported size: 512MB.
-   * Supported extensions: .PDF.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return gcsSource_ != null; - } - /** - * - * - *
-   * The Google Cloud Storage location of the document file. Only a single path
-   * should be given.
-   * Max supported size: 512MB.
-   * Supported extensions: .PDF.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - public com.google.cloud.automl.v1beta1.GcsSource getGcsSource() { - return gcsSource_ == null - ? com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance() - : gcsSource_; - } - /** - * - * - *
-   * The Google Cloud Storage location of the document file. Only a single path
-   * should be given.
-   * Max supported size: 512MB.
-   * Supported extensions: .PDF.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - return getGcsSource(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (gcsSource_ != null) { - output.writeMessage(1, getGcsSource()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (gcsSource_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcsSource()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DocumentInputConfig)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DocumentInputConfig other = - (com.google.cloud.automl.v1beta1.DocumentInputConfig) obj; - - if (hasGcsSource() != other.hasGcsSource()) return false; - if (hasGcsSource()) { - if (!getGcsSource().equals(other.getGcsSource())) return false; - } - if (!unknownFields.equals(other.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 (hasGcsSource()) { - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.DocumentInputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Input configuration of a [Document][google.cloud.automl.v1beta1.Document].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DocumentInputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DocumentInputConfig) - com.google.cloud.automl.v1beta1.DocumentInputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DocumentInputConfig.class, - com.google.cloud.automl.v1beta1.DocumentInputConfig.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DocumentInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (gcsSourceBuilder_ == null) { - gcsSource_ = null; - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentInputConfig getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DocumentInputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentInputConfig build() { - com.google.cloud.automl.v1beta1.DocumentInputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentInputConfig buildPartial() { - com.google.cloud.automl.v1beta1.DocumentInputConfig result = - new com.google.cloud.automl.v1beta1.DocumentInputConfig(this); - if (gcsSourceBuilder_ == null) { - result.gcsSource_ = gcsSource_; - } else { - result.gcsSource_ = gcsSourceBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DocumentInputConfig) { - return mergeFrom((com.google.cloud.automl.v1beta1.DocumentInputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DocumentInputConfig other) { - if (other == com.google.cloud.automl.v1beta1.DocumentInputConfig.getDefaultInstance()) - return this; - if (other.hasGcsSource()) { - mergeGcsSource(other.getGcsSource()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DocumentInputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.DocumentInputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.GcsSource gcsSource_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder> - gcsSourceBuilder_; - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return gcsSourceBuilder_ != null || gcsSource_ != null; - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - public com.google.cloud.automl.v1beta1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - return gcsSource_ == null - ? com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance() - : gcsSource_; - } else { - return gcsSourceBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.automl.v1beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - gcsSource_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.automl.v1beta1.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - gcsSource_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.automl.v1beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (gcsSource_ != null) { - gcsSource_ = - com.google.cloud.automl.v1beta1.GcsSource.newBuilder(gcsSource_) - .mergeFrom(value) - .buildPartial(); - } else { - gcsSource_ = value; - } - onChanged(); - } else { - gcsSourceBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - gcsSource_ = null; - onChanged(); - } else { - gcsSource_ = null; - gcsSourceBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSource.Builder getGcsSourceBuilder() { - - onChanged(); - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (gcsSourceBuilder_ != null) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - return gcsSource_ == null - ? com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance() - : gcsSource_; - } - } - /** - * - * - *
-     * The Google Cloud Storage location of the document file. Only a single path
-     * should be given.
-     * Max supported size: 512MB.
-     * Supported extensions: .PDF.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder>( - getGcsSource(), getParentForChildren(), isClean()); - gcsSource_ = null; - } - return gcsSourceBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.DocumentInputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DocumentInputConfig) - private static final com.google.cloud.automl.v1beta1.DocumentInputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DocumentInputConfig(); - } - - public static com.google.cloud.automl.v1beta1.DocumentInputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DocumentInputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DocumentInputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DocumentInputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfigOrBuilder.java deleted file mode 100644 index 54506b2a7..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentInputConfigOrBuilder.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface DocumentInputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DocumentInputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Google Cloud Storage location of the document file. Only a single path
-   * should be given.
-   * Max supported size: 512MB.
-   * Supported extensions: .PDF.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - * - * - *
-   * The Google Cloud Storage location of the document file. Only a single path
-   * should be given.
-   * Max supported size: 512MB.
-   * Supported extensions: .PDF.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - com.google.cloud.automl.v1beta1.GcsSource getGcsSource(); - /** - * - * - *
-   * The Google Cloud Storage location of the document file. Only a single path
-   * should be given.
-   * Max supported size: 512MB.
-   * Supported extensions: .PDF.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentOrBuilder.java deleted file mode 100644 index db8d216e7..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DocumentOrBuilder.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -public interface DocumentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Document) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * An input config specifying the content of the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - * - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - * - * - *
-   * An input config specifying the content of the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - * - * @return The inputConfig. - */ - com.google.cloud.automl.v1beta1.DocumentInputConfig getInputConfig(); - /** - * - * - *
-   * An input config specifying the content of the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentInputConfig input_config = 1; - */ - com.google.cloud.automl.v1beta1.DocumentInputConfigOrBuilder getInputConfigOrBuilder(); - - /** - * - * - *
-   * The plain text version of this document.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - * - * @return Whether the documentText field is set. - */ - boolean hasDocumentText(); - /** - * - * - *
-   * The plain text version of this document.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - * - * @return The documentText. - */ - com.google.cloud.automl.v1beta1.TextSnippet getDocumentText(); - /** - * - * - *
-   * The plain text version of this document.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet document_text = 2; - */ - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getDocumentTextOrBuilder(); - - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - java.util.List getLayoutList(); - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - com.google.cloud.automl.v1beta1.Document.Layout getLayout(int index); - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - int getLayoutCount(); - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - java.util.List - getLayoutOrBuilderList(); - /** - * - * - *
-   * Describes the layout of the document.
-   * Sorted by [page_number][].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Document.Layout layout = 3; - */ - com.google.cloud.automl.v1beta1.Document.LayoutOrBuilder getLayoutOrBuilder(int index); - - /** - * - * - *
-   * The dimensions of the page in the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - * - * @return Whether the documentDimensions field is set. - */ - boolean hasDocumentDimensions(); - /** - * - * - *
-   * The dimensions of the page in the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - * - * @return The documentDimensions. - */ - com.google.cloud.automl.v1beta1.DocumentDimensions getDocumentDimensions(); - /** - * - * - *
-   * The dimensions of the page in the document.
-   * 
- * - * .google.cloud.automl.v1beta1.DocumentDimensions document_dimensions = 4; - */ - com.google.cloud.automl.v1beta1.DocumentDimensionsOrBuilder getDocumentDimensionsOrBuilder(); - - /** - * - * - *
-   * Number of pages in the document.
-   * 
- * - * int32 page_count = 5; - * - * @return The pageCount. - */ - int getPageCount(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRange.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRange.java deleted file mode 100644 index 5ff5f6d46..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRange.java +++ /dev/null @@ -1,636 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/ranges.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A range between two double numbers.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DoubleRange} - */ -public final class DoubleRange extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.DoubleRange) - DoubleRangeOrBuilder { - private static final long serialVersionUID = 0L; - // Use DoubleRange.newBuilder() to construct. - private DoubleRange(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DoubleRange() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DoubleRange(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DoubleRange( - 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: - { - start_ = input.readDouble(); - break; - } - case 17: - { - end_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.RangesProto - .internal_static_google_cloud_automl_v1beta1_DoubleRange_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.RangesProto - .internal_static_google_cloud_automl_v1beta1_DoubleRange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DoubleRange.class, - com.google.cloud.automl.v1beta1.DoubleRange.Builder.class); - } - - public static final int START_FIELD_NUMBER = 1; - private double start_; - /** - * - * - *
-   * Start of the range, inclusive.
-   * 
- * - * double start = 1; - * - * @return The start. - */ - public double getStart() { - return start_; - } - - public static final int END_FIELD_NUMBER = 2; - private double end_; - /** - * - * - *
-   * End of the range, exclusive.
-   * 
- * - * double end = 2; - * - * @return The end. - */ - public double getEnd() { - return end_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (start_ != 0D) { - output.writeDouble(1, start_); - } - if (end_ != 0D) { - output.writeDouble(2, end_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (start_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, start_); - } - if (end_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, end_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.DoubleRange)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.DoubleRange other = - (com.google.cloud.automl.v1beta1.DoubleRange) obj; - - if (java.lang.Double.doubleToLongBits(getStart()) - != java.lang.Double.doubleToLongBits(other.getStart())) return false; - if (java.lang.Double.doubleToLongBits(getEnd()) - != java.lang.Double.doubleToLongBits(other.getEnd())) return false; - if (!unknownFields.equals(other.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) + START_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getStart())); - hash = (37 * hash) + END_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getEnd())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.DoubleRange prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 range between two double numbers.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.DoubleRange} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.DoubleRange) - com.google.cloud.automl.v1beta1.DoubleRangeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.RangesProto - .internal_static_google_cloud_automl_v1beta1_DoubleRange_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.RangesProto - .internal_static_google_cloud_automl_v1beta1_DoubleRange_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.DoubleRange.class, - com.google.cloud.automl.v1beta1.DoubleRange.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.DoubleRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - start_ = 0D; - - end_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.RangesProto - .internal_static_google_cloud_automl_v1beta1_DoubleRange_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DoubleRange getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.DoubleRange.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DoubleRange build() { - com.google.cloud.automl.v1beta1.DoubleRange result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DoubleRange buildPartial() { - com.google.cloud.automl.v1beta1.DoubleRange result = - new com.google.cloud.automl.v1beta1.DoubleRange(this); - result.start_ = start_; - result.end_ = end_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.DoubleRange) { - return mergeFrom((com.google.cloud.automl.v1beta1.DoubleRange) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.DoubleRange other) { - if (other == com.google.cloud.automl.v1beta1.DoubleRange.getDefaultInstance()) return this; - if (other.getStart() != 0D) { - setStart(other.getStart()); - } - if (other.getEnd() != 0D) { - setEnd(other.getEnd()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.DoubleRange parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.DoubleRange) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double start_; - /** - * - * - *
-     * Start of the range, inclusive.
-     * 
- * - * double start = 1; - * - * @return The start. - */ - public double getStart() { - return start_; - } - /** - * - * - *
-     * Start of the range, inclusive.
-     * 
- * - * double start = 1; - * - * @param value The start to set. - * @return This builder for chaining. - */ - public Builder setStart(double value) { - - start_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Start of the range, inclusive.
-     * 
- * - * double start = 1; - * - * @return This builder for chaining. - */ - public Builder clearStart() { - - start_ = 0D; - onChanged(); - return this; - } - - private double end_; - /** - * - * - *
-     * End of the range, exclusive.
-     * 
- * - * double end = 2; - * - * @return The end. - */ - public double getEnd() { - return end_; - } - /** - * - * - *
-     * End of the range, exclusive.
-     * 
- * - * double end = 2; - * - * @param value The end to set. - * @return This builder for chaining. - */ - public Builder setEnd(double value) { - - end_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * End of the range, exclusive.
-     * 
- * - * double end = 2; - * - * @return This builder for chaining. - */ - public Builder clearEnd() { - - end_ = 0D; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.DoubleRange) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.DoubleRange) - private static final com.google.cloud.automl.v1beta1.DoubleRange DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.DoubleRange(); - } - - public static com.google.cloud.automl.v1beta1.DoubleRange getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DoubleRange parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DoubleRange(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.DoubleRange getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRangeOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRangeOrBuilder.java deleted file mode 100644 index ba891fc3e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/DoubleRangeOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/ranges.proto - -package com.google.cloud.automl.v1beta1; - -public interface DoubleRangeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.DoubleRange) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Start of the range, inclusive.
-   * 
- * - * double start = 1; - * - * @return The start. - */ - double getStart(); - - /** - * - * - *
-   * End of the range, exclusive.
-   * 
- * - * double end = 2; - * - * @return The end. - */ - double getEnd(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayload.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayload.java deleted file mode 100644 index 22453800b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayload.java +++ /dev/null @@ -1,1722 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Example data used for training or prediction.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExamplePayload} - */ -public final class ExamplePayload extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ExamplePayload) - ExamplePayloadOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExamplePayload.newBuilder() to construct. - private ExamplePayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExamplePayload() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExamplePayload(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExamplePayload( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.automl.v1beta1.Image.Builder subBuilder = null; - if (payloadCase_ == 1) { - subBuilder = ((com.google.cloud.automl.v1beta1.Image) payload_).toBuilder(); - } - payload_ = - input.readMessage( - com.google.cloud.automl.v1beta1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.Image) payload_); - payload_ = subBuilder.buildPartial(); - } - payloadCase_ = 1; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.TextSnippet.Builder subBuilder = null; - if (payloadCase_ == 2) { - subBuilder = ((com.google.cloud.automl.v1beta1.TextSnippet) payload_).toBuilder(); - } - payload_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSnippet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.TextSnippet) payload_); - payload_ = subBuilder.buildPartial(); - } - payloadCase_ = 2; - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.Row.Builder subBuilder = null; - if (payloadCase_ == 3) { - subBuilder = ((com.google.cloud.automl.v1beta1.Row) payload_).toBuilder(); - } - payload_ = - input.readMessage( - com.google.cloud.automl.v1beta1.Row.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.Row) payload_); - payload_ = subBuilder.buildPartial(); - } - payloadCase_ = 3; - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.Document.Builder subBuilder = null; - if (payloadCase_ == 4) { - subBuilder = ((com.google.cloud.automl.v1beta1.Document) payload_).toBuilder(); - } - payload_ = - input.readMessage( - com.google.cloud.automl.v1beta1.Document.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.Document) payload_); - payload_ = subBuilder.buildPartial(); - } - payloadCase_ = 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.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_ExamplePayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_ExamplePayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExamplePayload.class, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder.class); - } - - private int payloadCase_ = 0; - private java.lang.Object payload_; - - public enum PayloadCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - IMAGE(1), - TEXT_SNIPPET(2), - DOCUMENT(4), - ROW(3), - PAYLOAD_NOT_SET(0); - private final int value; - - private PayloadCase(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 PayloadCase valueOf(int value) { - return forNumber(value); - } - - public static PayloadCase forNumber(int value) { - switch (value) { - case 1: - return IMAGE; - case 2: - return TEXT_SNIPPET; - case 4: - return DOCUMENT; - case 3: - return ROW; - case 0: - return PAYLOAD_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public PayloadCase getPayloadCase() { - return PayloadCase.forNumber(payloadCase_); - } - - public static final int IMAGE_FIELD_NUMBER = 1; - /** - * - * - *
-   * Example image.
-   * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - * - * @return Whether the image field is set. - */ - public boolean hasImage() { - return payloadCase_ == 1; - } - /** - * - * - *
-   * Example image.
-   * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - * - * @return The image. - */ - public com.google.cloud.automl.v1beta1.Image getImage() { - if (payloadCase_ == 1) { - return (com.google.cloud.automl.v1beta1.Image) payload_; - } - return com.google.cloud.automl.v1beta1.Image.getDefaultInstance(); - } - /** - * - * - *
-   * Example image.
-   * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - public com.google.cloud.automl.v1beta1.ImageOrBuilder getImageOrBuilder() { - if (payloadCase_ == 1) { - return (com.google.cloud.automl.v1beta1.Image) payload_; - } - return com.google.cloud.automl.v1beta1.Image.getDefaultInstance(); - } - - public static final int TEXT_SNIPPET_FIELD_NUMBER = 2; - /** - * - * - *
-   * Example text.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - * - * @return Whether the textSnippet field is set. - */ - public boolean hasTextSnippet() { - return payloadCase_ == 2; - } - /** - * - * - *
-   * Example text.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - * - * @return The textSnippet. - */ - public com.google.cloud.automl.v1beta1.TextSnippet getTextSnippet() { - if (payloadCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TextSnippet) payload_; - } - return com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance(); - } - /** - * - * - *
-   * Example text.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - public com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getTextSnippetOrBuilder() { - if (payloadCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TextSnippet) payload_; - } - return com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance(); - } - - public static final int DOCUMENT_FIELD_NUMBER = 4; - /** - * - * - *
-   * Example document.
-   * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - * - * @return Whether the document field is set. - */ - public boolean hasDocument() { - return payloadCase_ == 4; - } - /** - * - * - *
-   * Example document.
-   * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - * - * @return The document. - */ - public com.google.cloud.automl.v1beta1.Document getDocument() { - if (payloadCase_ == 4) { - return (com.google.cloud.automl.v1beta1.Document) payload_; - } - return com.google.cloud.automl.v1beta1.Document.getDefaultInstance(); - } - /** - * - * - *
-   * Example document.
-   * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - public com.google.cloud.automl.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { - if (payloadCase_ == 4) { - return (com.google.cloud.automl.v1beta1.Document) payload_; - } - return com.google.cloud.automl.v1beta1.Document.getDefaultInstance(); - } - - public static final int ROW_FIELD_NUMBER = 3; - /** - * - * - *
-   * Example relational table row.
-   * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - * - * @return Whether the row field is set. - */ - public boolean hasRow() { - return payloadCase_ == 3; - } - /** - * - * - *
-   * Example relational table row.
-   * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - * - * @return The row. - */ - public com.google.cloud.automl.v1beta1.Row getRow() { - if (payloadCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Row) payload_; - } - return com.google.cloud.automl.v1beta1.Row.getDefaultInstance(); - } - /** - * - * - *
-   * Example relational table row.
-   * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - public com.google.cloud.automl.v1beta1.RowOrBuilder getRowOrBuilder() { - if (payloadCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Row) payload_; - } - return com.google.cloud.automl.v1beta1.Row.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (payloadCase_ == 1) { - output.writeMessage(1, (com.google.cloud.automl.v1beta1.Image) payload_); - } - if (payloadCase_ == 2) { - output.writeMessage(2, (com.google.cloud.automl.v1beta1.TextSnippet) payload_); - } - if (payloadCase_ == 3) { - output.writeMessage(3, (com.google.cloud.automl.v1beta1.Row) payload_); - } - if (payloadCase_ == 4) { - output.writeMessage(4, (com.google.cloud.automl.v1beta1.Document) payload_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (payloadCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.automl.v1beta1.Image) payload_); - } - if (payloadCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.automl.v1beta1.TextSnippet) payload_); - } - if (payloadCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.automl.v1beta1.Row) payload_); - } - if (payloadCase_ == 4) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, (com.google.cloud.automl.v1beta1.Document) payload_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ExamplePayload)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExamplePayload other = - (com.google.cloud.automl.v1beta1.ExamplePayload) obj; - - if (!getPayloadCase().equals(other.getPayloadCase())) return false; - switch (payloadCase_) { - case 1: - if (!getImage().equals(other.getImage())) return false; - break; - case 2: - if (!getTextSnippet().equals(other.getTextSnippet())) return false; - break; - case 4: - if (!getDocument().equals(other.getDocument())) return false; - break; - case 3: - if (!getRow().equals(other.getRow())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (payloadCase_) { - case 1: - hash = (37 * hash) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - break; - case 2: - hash = (37 * hash) + TEXT_SNIPPET_FIELD_NUMBER; - hash = (53 * hash) + getTextSnippet().hashCode(); - break; - case 4: - hash = (37 * hash) + DOCUMENT_FIELD_NUMBER; - hash = (53 * hash) + getDocument().hashCode(); - break; - case 3: - hash = (37 * hash) + ROW_FIELD_NUMBER; - hash = (53 * hash) + getRow().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ExamplePayload prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Example data used for training or prediction.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExamplePayload} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExamplePayload) - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_ExamplePayload_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_ExamplePayload_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExamplePayload.class, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ExamplePayload.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - payloadCase_ = 0; - payload_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_ExamplePayload_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExamplePayload getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExamplePayload build() { - com.google.cloud.automl.v1beta1.ExamplePayload result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExamplePayload buildPartial() { - com.google.cloud.automl.v1beta1.ExamplePayload result = - new com.google.cloud.automl.v1beta1.ExamplePayload(this); - if (payloadCase_ == 1) { - if (imageBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = imageBuilder_.build(); - } - } - if (payloadCase_ == 2) { - if (textSnippetBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = textSnippetBuilder_.build(); - } - } - if (payloadCase_ == 4) { - if (documentBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = documentBuilder_.build(); - } - } - if (payloadCase_ == 3) { - if (rowBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = rowBuilder_.build(); - } - } - result.payloadCase_ = payloadCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ExamplePayload) { - return mergeFrom((com.google.cloud.automl.v1beta1.ExamplePayload) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ExamplePayload other) { - if (other == com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance()) return this; - switch (other.getPayloadCase()) { - case IMAGE: - { - mergeImage(other.getImage()); - break; - } - case TEXT_SNIPPET: - { - mergeTextSnippet(other.getTextSnippet()); - break; - } - case DOCUMENT: - { - mergeDocument(other.getDocument()); - break; - } - case ROW: - { - mergeRow(other.getRow()); - break; - } - case PAYLOAD_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ExamplePayload parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.ExamplePayload) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int payloadCase_ = 0; - private java.lang.Object payload_; - - public PayloadCase getPayloadCase() { - return PayloadCase.forNumber(payloadCase_); - } - - public Builder clearPayload() { - payloadCase_ = 0; - payload_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Image, - com.google.cloud.automl.v1beta1.Image.Builder, - com.google.cloud.automl.v1beta1.ImageOrBuilder> - imageBuilder_; - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - * - * @return Whether the image field is set. - */ - public boolean hasImage() { - return payloadCase_ == 1; - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - * - * @return The image. - */ - public com.google.cloud.automl.v1beta1.Image getImage() { - if (imageBuilder_ == null) { - if (payloadCase_ == 1) { - return (com.google.cloud.automl.v1beta1.Image) payload_; - } - return com.google.cloud.automl.v1beta1.Image.getDefaultInstance(); - } else { - if (payloadCase_ == 1) { - return imageBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.Image.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - public Builder setImage(com.google.cloud.automl.v1beta1.Image value) { - if (imageBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - imageBuilder_.setMessage(value); - } - payloadCase_ = 1; - return this; - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - public Builder setImage(com.google.cloud.automl.v1beta1.Image.Builder builderForValue) { - if (imageBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - imageBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 1; - return this; - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - public Builder mergeImage(com.google.cloud.automl.v1beta1.Image value) { - if (imageBuilder_ == null) { - if (payloadCase_ == 1 - && payload_ != com.google.cloud.automl.v1beta1.Image.getDefaultInstance()) { - payload_ = - com.google.cloud.automl.v1beta1.Image.newBuilder( - (com.google.cloud.automl.v1beta1.Image) payload_) - .mergeFrom(value) - .buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 1) { - imageBuilder_.mergeFrom(value); - } - imageBuilder_.setMessage(value); - } - payloadCase_ = 1; - return this; - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - public Builder clearImage() { - if (imageBuilder_ == null) { - if (payloadCase_ == 1) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 1) { - payloadCase_ = 0; - payload_ = null; - } - imageBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - public com.google.cloud.automl.v1beta1.Image.Builder getImageBuilder() { - return getImageFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - public com.google.cloud.automl.v1beta1.ImageOrBuilder getImageOrBuilder() { - if ((payloadCase_ == 1) && (imageBuilder_ != null)) { - return imageBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 1) { - return (com.google.cloud.automl.v1beta1.Image) payload_; - } - return com.google.cloud.automl.v1beta1.Image.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example image.
-     * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Image, - com.google.cloud.automl.v1beta1.Image.Builder, - com.google.cloud.automl.v1beta1.ImageOrBuilder> - getImageFieldBuilder() { - if (imageBuilder_ == null) { - if (!(payloadCase_ == 1)) { - payload_ = com.google.cloud.automl.v1beta1.Image.getDefaultInstance(); - } - imageBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Image, - com.google.cloud.automl.v1beta1.Image.Builder, - com.google.cloud.automl.v1beta1.ImageOrBuilder>( - (com.google.cloud.automl.v1beta1.Image) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 1; - onChanged(); - ; - return imageBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder> - textSnippetBuilder_; - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - * - * @return Whether the textSnippet field is set. - */ - public boolean hasTextSnippet() { - return payloadCase_ == 2; - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - * - * @return The textSnippet. - */ - public com.google.cloud.automl.v1beta1.TextSnippet getTextSnippet() { - if (textSnippetBuilder_ == null) { - if (payloadCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TextSnippet) payload_; - } - return com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance(); - } else { - if (payloadCase_ == 2) { - return textSnippetBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - public Builder setTextSnippet(com.google.cloud.automl.v1beta1.TextSnippet value) { - if (textSnippetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - textSnippetBuilder_.setMessage(value); - } - payloadCase_ = 2; - return this; - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - public Builder setTextSnippet( - com.google.cloud.automl.v1beta1.TextSnippet.Builder builderForValue) { - if (textSnippetBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - textSnippetBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 2; - return this; - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - public Builder mergeTextSnippet(com.google.cloud.automl.v1beta1.TextSnippet value) { - if (textSnippetBuilder_ == null) { - if (payloadCase_ == 2 - && payload_ != com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance()) { - payload_ = - com.google.cloud.automl.v1beta1.TextSnippet.newBuilder( - (com.google.cloud.automl.v1beta1.TextSnippet) payload_) - .mergeFrom(value) - .buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 2) { - textSnippetBuilder_.mergeFrom(value); - } - textSnippetBuilder_.setMessage(value); - } - payloadCase_ = 2; - return this; - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - public Builder clearTextSnippet() { - if (textSnippetBuilder_ == null) { - if (payloadCase_ == 2) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 2) { - payloadCase_ = 0; - payload_ = null; - } - textSnippetBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - public com.google.cloud.automl.v1beta1.TextSnippet.Builder getTextSnippetBuilder() { - return getTextSnippetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - public com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getTextSnippetOrBuilder() { - if ((payloadCase_ == 2) && (textSnippetBuilder_ != null)) { - return textSnippetBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 2) { - return (com.google.cloud.automl.v1beta1.TextSnippet) payload_; - } - return com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example text.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder> - getTextSnippetFieldBuilder() { - if (textSnippetBuilder_ == null) { - if (!(payloadCase_ == 2)) { - payload_ = com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance(); - } - textSnippetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder>( - (com.google.cloud.automl.v1beta1.TextSnippet) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 2; - onChanged(); - ; - return textSnippetBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Document, - com.google.cloud.automl.v1beta1.Document.Builder, - com.google.cloud.automl.v1beta1.DocumentOrBuilder> - documentBuilder_; - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - * - * @return Whether the document field is set. - */ - public boolean hasDocument() { - return payloadCase_ == 4; - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - * - * @return The document. - */ - public com.google.cloud.automl.v1beta1.Document getDocument() { - if (documentBuilder_ == null) { - if (payloadCase_ == 4) { - return (com.google.cloud.automl.v1beta1.Document) payload_; - } - return com.google.cloud.automl.v1beta1.Document.getDefaultInstance(); - } else { - if (payloadCase_ == 4) { - return documentBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.Document.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - public Builder setDocument(com.google.cloud.automl.v1beta1.Document value) { - if (documentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - documentBuilder_.setMessage(value); - } - payloadCase_ = 4; - return this; - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - public Builder setDocument(com.google.cloud.automl.v1beta1.Document.Builder builderForValue) { - if (documentBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - documentBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 4; - return this; - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - public Builder mergeDocument(com.google.cloud.automl.v1beta1.Document value) { - if (documentBuilder_ == null) { - if (payloadCase_ == 4 - && payload_ != com.google.cloud.automl.v1beta1.Document.getDefaultInstance()) { - payload_ = - com.google.cloud.automl.v1beta1.Document.newBuilder( - (com.google.cloud.automl.v1beta1.Document) payload_) - .mergeFrom(value) - .buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 4) { - documentBuilder_.mergeFrom(value); - } - documentBuilder_.setMessage(value); - } - payloadCase_ = 4; - return this; - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - public Builder clearDocument() { - if (documentBuilder_ == null) { - if (payloadCase_ == 4) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 4) { - payloadCase_ = 0; - payload_ = null; - } - documentBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - public com.google.cloud.automl.v1beta1.Document.Builder getDocumentBuilder() { - return getDocumentFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - public com.google.cloud.automl.v1beta1.DocumentOrBuilder getDocumentOrBuilder() { - if ((payloadCase_ == 4) && (documentBuilder_ != null)) { - return documentBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 4) { - return (com.google.cloud.automl.v1beta1.Document) payload_; - } - return com.google.cloud.automl.v1beta1.Document.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example document.
-     * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Document, - com.google.cloud.automl.v1beta1.Document.Builder, - com.google.cloud.automl.v1beta1.DocumentOrBuilder> - getDocumentFieldBuilder() { - if (documentBuilder_ == null) { - if (!(payloadCase_ == 4)) { - payload_ = com.google.cloud.automl.v1beta1.Document.getDefaultInstance(); - } - documentBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Document, - com.google.cloud.automl.v1beta1.Document.Builder, - com.google.cloud.automl.v1beta1.DocumentOrBuilder>( - (com.google.cloud.automl.v1beta1.Document) payload_, - getParentForChildren(), - isClean()); - payload_ = null; - } - payloadCase_ = 4; - onChanged(); - ; - return documentBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Row, - com.google.cloud.automl.v1beta1.Row.Builder, - com.google.cloud.automl.v1beta1.RowOrBuilder> - rowBuilder_; - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - * - * @return Whether the row field is set. - */ - public boolean hasRow() { - return payloadCase_ == 3; - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - * - * @return The row. - */ - public com.google.cloud.automl.v1beta1.Row getRow() { - if (rowBuilder_ == null) { - if (payloadCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Row) payload_; - } - return com.google.cloud.automl.v1beta1.Row.getDefaultInstance(); - } else { - if (payloadCase_ == 3) { - return rowBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.Row.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - public Builder setRow(com.google.cloud.automl.v1beta1.Row value) { - if (rowBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - rowBuilder_.setMessage(value); - } - payloadCase_ = 3; - return this; - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - public Builder setRow(com.google.cloud.automl.v1beta1.Row.Builder builderForValue) { - if (rowBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - rowBuilder_.setMessage(builderForValue.build()); - } - payloadCase_ = 3; - return this; - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - public Builder mergeRow(com.google.cloud.automl.v1beta1.Row value) { - if (rowBuilder_ == null) { - if (payloadCase_ == 3 - && payload_ != com.google.cloud.automl.v1beta1.Row.getDefaultInstance()) { - payload_ = - com.google.cloud.automl.v1beta1.Row.newBuilder( - (com.google.cloud.automl.v1beta1.Row) payload_) - .mergeFrom(value) - .buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - if (payloadCase_ == 3) { - rowBuilder_.mergeFrom(value); - } - rowBuilder_.setMessage(value); - } - payloadCase_ = 3; - return this; - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - public Builder clearRow() { - if (rowBuilder_ == null) { - if (payloadCase_ == 3) { - payloadCase_ = 0; - payload_ = null; - onChanged(); - } - } else { - if (payloadCase_ == 3) { - payloadCase_ = 0; - payload_ = null; - } - rowBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - public com.google.cloud.automl.v1beta1.Row.Builder getRowBuilder() { - return getRowFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - public com.google.cloud.automl.v1beta1.RowOrBuilder getRowOrBuilder() { - if ((payloadCase_ == 3) && (rowBuilder_ != null)) { - return rowBuilder_.getMessageOrBuilder(); - } else { - if (payloadCase_ == 3) { - return (com.google.cloud.automl.v1beta1.Row) payload_; - } - return com.google.cloud.automl.v1beta1.Row.getDefaultInstance(); - } - } - /** - * - * - *
-     * Example relational table row.
-     * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Row, - com.google.cloud.automl.v1beta1.Row.Builder, - com.google.cloud.automl.v1beta1.RowOrBuilder> - getRowFieldBuilder() { - if (rowBuilder_ == null) { - if (!(payloadCase_ == 3)) { - payload_ = com.google.cloud.automl.v1beta1.Row.getDefaultInstance(); - } - rowBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Row, - com.google.cloud.automl.v1beta1.Row.Builder, - com.google.cloud.automl.v1beta1.RowOrBuilder>( - (com.google.cloud.automl.v1beta1.Row) payload_, getParentForChildren(), isClean()); - payload_ = null; - } - payloadCase_ = 3; - onChanged(); - ; - return rowBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ExamplePayload) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExamplePayload) - private static final com.google.cloud.automl.v1beta1.ExamplePayload DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ExamplePayload(); - } - - public static com.google.cloud.automl.v1beta1.ExamplePayload getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExamplePayload parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExamplePayload(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExamplePayload getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayloadOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayloadOrBuilder.java deleted file mode 100644 index 98988792b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExamplePayloadOrBuilder.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExamplePayloadOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExamplePayload) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Example image.
-   * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - * - * @return Whether the image field is set. - */ - boolean hasImage(); - /** - * - * - *
-   * Example image.
-   * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - * - * @return The image. - */ - com.google.cloud.automl.v1beta1.Image getImage(); - /** - * - * - *
-   * Example image.
-   * 
- * - * .google.cloud.automl.v1beta1.Image image = 1; - */ - com.google.cloud.automl.v1beta1.ImageOrBuilder getImageOrBuilder(); - - /** - * - * - *
-   * Example text.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - * - * @return Whether the textSnippet field is set. - */ - boolean hasTextSnippet(); - /** - * - * - *
-   * Example text.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - * - * @return The textSnippet. - */ - com.google.cloud.automl.v1beta1.TextSnippet getTextSnippet(); - /** - * - * - *
-   * Example text.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet text_snippet = 2; - */ - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getTextSnippetOrBuilder(); - - /** - * - * - *
-   * Example document.
-   * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - * - * @return Whether the document field is set. - */ - boolean hasDocument(); - /** - * - * - *
-   * Example document.
-   * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - * - * @return The document. - */ - com.google.cloud.automl.v1beta1.Document getDocument(); - /** - * - * - *
-   * Example document.
-   * 
- * - * .google.cloud.automl.v1beta1.Document document = 4; - */ - com.google.cloud.automl.v1beta1.DocumentOrBuilder getDocumentOrBuilder(); - - /** - * - * - *
-   * Example relational table row.
-   * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - * - * @return Whether the row field is set. - */ - boolean hasRow(); - /** - * - * - *
-   * Example relational table row.
-   * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - * - * @return The row. - */ - com.google.cloud.automl.v1beta1.Row getRow(); - /** - * - * - *
-   * Example relational table row.
-   * 
- * - * .google.cloud.automl.v1beta1.Row row = 3; - */ - com.google.cloud.automl.v1beta1.RowOrBuilder getRowOrBuilder(); - - public com.google.cloud.automl.v1beta1.ExamplePayload.PayloadCase getPayloadCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadata.java deleted file mode 100644 index 8761c85b7..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadata.java +++ /dev/null @@ -1,1824 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of ExportData operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportDataOperationMetadata} - */ -public final class ExportDataOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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() {} - - @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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .Builder - subBuilder = null; - if (outputInfo_ != null) { - subBuilder = outputInfo_.toBuilder(); - } - outputInfo_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata - .ExportDataOutputInfo.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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.class, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder.class); - } - - public interface ExportDataOutputInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the exported data is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The gcsOutputDirectory. - */ - java.lang.String getGcsOutputDirectory(); - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the exported data is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The bytes for gcsOutputDirectory. - */ - com.google.protobuf.ByteString getGcsOutputDirectoryBytes(); - - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the exported data is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bigqueryOutputDataset. - */ - java.lang.String getBigqueryOutputDataset(); - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the exported data is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bytes for bigqueryOutputDataset. - */ - com.google.protobuf.ByteString getBigqueryOutputDatasetBytes(); - - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .OutputLocationCase - getOutputLocationCase(); - } - /** - * - * - *
-   * Further describes this export data's output.
-   * Supplements
-   * [OutputConfig][google.cloud.automl.v1beta1.OutputConfig].
-   * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} - */ - public static final class ExportDataOutputInfo extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - ExportDataOutputInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportDataOutputInfo.newBuilder() to construct. - private ExportDataOutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportDataOutputInfo() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportDataOutputInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportDataOutputInfo( - 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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .class, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .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; - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the exported data is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - } - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the exported data is written.
-     * 
- * - * string gcs_output_directory = 1; - * - * @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; - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the exported data is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @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; - } - } - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the exported data is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo other = - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) 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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 export data's output.
-     * Supplements
-     * [OutputConfig][google.cloud.automl.v1beta1.OutputConfig].
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .class, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - build() { - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - buildPartial() { - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo result = - new com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo( - 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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo other) { - if (other - == com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - 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; - } - - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the exported data is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @return The gcsOutputDirectory. - */ - 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; - } - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the exported data is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @return The bytes for gcsOutputDirectory. - */ - 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; - } - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the exported data is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the exported data is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @return This builder for chaining. - */ - public Builder clearGcsOutputDirectory() { - if (outputLocationCase_ == 1) { - outputLocationCase_ = 0; - outputLocation_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the exported data is written.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the exported data is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bigqueryOutputDataset. - */ - 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; - } - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the exported data is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bytes for bigqueryOutputDataset. - */ - 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; - } - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the exported data is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @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; - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the exported data is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return This builder for chaining. - */ - public Builder clearBigqueryOutputDataset() { - if (outputLocationCase_ == 2) { - outputLocationCase_ = 0; - outputLocation_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the exported data is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @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.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo) - private static final com.google.cloud.automl.v1beta1.ExportDataOperationMetadata - .ExportDataOutputInfo - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo(); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportDataOutputInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportDataOutputInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int OUTPUT_INFO_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - outputInfo_; - /** - * - * - *
-   * Output only. Information further describing this export data's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - * - * @return Whether the outputInfo field is set. - */ - public boolean hasOutputInfo() { - return outputInfo_ != null; - } - /** - * - * - *
-   * Output only. Information further describing this export data's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - getOutputInfo() { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .getDefaultInstance() - : outputInfo_; - } - /** - * - * - *
-   * Output only. Information further describing this export data's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfoOrBuilder - 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 (outputInfo_ != null) { - output.writeMessage(1, getOutputInfo()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (outputInfo_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, 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.automl.v1beta1.ExportDataOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata other = - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) obj; - - 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 (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.automl.v1beta1.ExportDataOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportDataOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportDataOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportDataOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportDataOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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; - } - /** - * - * - *
-   * Details of ExportData operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportDataOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportDataOperationMetadata) - com.google.cloud.automl.v1beta1.ExportDataOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.class, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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 (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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata build() { - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata result = - new com.google.cloud.automl.v1beta1.ExportDataOperationMetadata(this); - 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.automl.v1beta1.ExportDataOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ExportDataOperationMetadata other) { - if (other == com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance()) - return this; - 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.automl.v1beta1.ExportDataOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - outputInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata - .ExportDataOutputInfoOrBuilder> - outputInfoBuilder_; - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - * - * @return Whether the outputInfo field is set. - */ - public boolean hasOutputInfo() { - return outputInfoBuilder_ != null || outputInfo_ != null; - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - getOutputInfo() { - if (outputInfoBuilder_ == null) { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .getDefaultInstance() - : outputInfo_; - } else { - return outputInfoBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo value) { - if (outputInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputInfo_ = value; - onChanged(); - } else { - outputInfoBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.Builder - builderForValue) { - if (outputInfoBuilder_ == null) { - outputInfo_ = builderForValue.build(); - onChanged(); - } else { - outputInfoBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - public Builder mergeOutputInfo( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo value) { - if (outputInfoBuilder_ == null) { - if (outputInfo_ != null) { - outputInfo_ = - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .newBuilder(outputInfo_) - .mergeFrom(value) - .buildPartial(); - } else { - outputInfo_ = value; - } - onChanged(); - } else { - outputInfoBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - public Builder clearOutputInfo() { - if (outputInfoBuilder_ == null) { - outputInfo_ = null; - onChanged(); - } else { - outputInfo_ = null; - outputInfoBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo.Builder - getOutputInfoBuilder() { - - onChanged(); - return getOutputInfoFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfoOrBuilder - getOutputInfoOrBuilder() { - if (outputInfoBuilder_ != null) { - return outputInfoBuilder_.getMessageOrBuilder(); - } else { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .getDefaultInstance() - : outputInfo_; - } - } - /** - * - * - *
-     * Output only. Information further describing this export data's output.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata - .ExportDataOutputInfoOrBuilder> - getOutputInfoFieldBuilder() { - if (outputInfoBuilder_ == null) { - outputInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata - .ExportDataOutputInfoOrBuilder>( - 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.automl.v1beta1.ExportDataOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportDataOperationMetadata) - private static final com.google.cloud.automl.v1beta1.ExportDataOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ExportDataOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportDataOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadataOrBuilder.java deleted file mode 100644 index 00325c144..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataOperationMetadataOrBuilder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExportDataOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportDataOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Information further describing this export data's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - * - * @return Whether the outputInfo field is set. - */ - boolean hasOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing this export data's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - * - * @return The outputInfo. - */ - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo getOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing this export data's output.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfo output_info = 1; - * - */ - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.ExportDataOutputInfoOrBuilder - getOutputInfoOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequest.java deleted file mode 100644 index 11724c53b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequest.java +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportDataRequest} - */ -public final class ExportDataRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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 26: - { - com.google.cloud.automl.v1beta1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportDataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportDataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportDataRequest.class, - com.google.cloud.automl.v1beta1.ExportDataRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the dataset.
-   * 
- * - * - * string name = 1 [(.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) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource name of the dataset.
-   * 
- * - * - * string name = 1 [(.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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.OutputConfig outputConfig_; - /** - * - * - *
-   * Required. The desired output location.
-   * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Required. The desired output location.
-   * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.OutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Required. The desired output location.
-   * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (outputConfig_ != null) { - output.writeMessage(3, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ExportDataRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportDataRequest other = - (com.google.cloud.automl.v1beta1.ExportDataRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig().equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ExportDataRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportDataRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportDataRequest) - com.google.cloud.automl.v1beta1.ExportDataRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportDataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportDataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportDataRequest.class, - com.google.cloud.automl.v1beta1.ExportDataRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ExportDataRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportDataRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportDataRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataRequest build() { - com.google.cloud.automl.v1beta1.ExportDataRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataRequest buildPartial() { - com.google.cloud.automl.v1beta1.ExportDataRequest result = - new com.google.cloud.automl.v1beta1.ExportDataRequest(this); - result.name_ = name_; - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ExportDataRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ExportDataRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ExportDataRequest other) { - if (other == com.google.cloud.automl.v1beta1.ExportDataRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ExportDataRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportDataRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the dataset.
-     * 
- * - * - * string name = 1 [(.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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.automl.v1beta1.OutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.OutputConfig, - com.google.cloud.automl.v1beta1.OutputConfig.Builder, - com.google.cloud.automl.v1beta1.OutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Required. The desired output location.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.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.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The desired output location.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig(com.google.cloud.automl.v1beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The desired output location.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig( - com.google.cloud.automl.v1beta1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The desired output location.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeOutputConfig(com.google.cloud.automl.v1beta1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.automl.v1beta1.OutputConfig.newBuilder(outputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The desired output location.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.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.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The desired output location.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Required. The desired output location.
-     * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.OutputConfig, - com.google.cloud.automl.v1beta1.OutputConfig.Builder, - com.google.cloud.automl.v1beta1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.OutputConfig, - com.google.cloud.automl.v1beta1.OutputConfig.Builder, - com.google.cloud.automl.v1beta1.OutputConfigOrBuilder>( - getOutputConfig(), getParentForChildren(), isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ExportDataRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportDataRequest) - private static final com.google.cloud.automl.v1beta1.ExportDataRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ExportDataRequest(); - } - - public static com.google.cloud.automl.v1beta1.ExportDataRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportDataRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportDataRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportDataRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequestOrBuilder.java deleted file mode 100644 index 2b3880ab4..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportDataRequestOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExportDataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportDataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the 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.
-   * 
- * - * - * 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.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Required. The desired output location.
-   * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - com.google.cloud.automl.v1beta1.OutputConfig getOutputConfig(); - /** - * - * - *
-   * Required. The desired output location.
-   * 
- * - * - * .google.cloud.automl.v1beta1.OutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadata.java deleted file mode 100644 index bf1a3a766..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadata.java +++ /dev/null @@ -1,1560 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of EvaluatedExamples operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} - */ -public final class ExportEvaluatedExamplesOperationMetadata - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - ExportEvaluatedExamplesOperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportEvaluatedExamplesOperationMetadata.newBuilder() to construct. - private ExportEvaluatedExamplesOperationMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportEvaluatedExamplesOperationMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportEvaluatedExamplesOperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportEvaluatedExamplesOperationMetadata( - 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: - { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.Builder - subBuilder = null; - if (outputInfo_ != null) { - subBuilder = outputInfo_.toBuilder(); - } - outputInfo_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder.class); - } - - public interface ExportEvaluatedExamplesOutputInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the output of export evaluated examples is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bigqueryOutputDataset. - */ - java.lang.String getBigqueryOutputDataset(); - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the output of export evaluated examples is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bytes for bigqueryOutputDataset. - */ - com.google.protobuf.ByteString getBigqueryOutputDatasetBytes(); - } - /** - * - * - *
-   * Further describes the output of the evaluated examples export.
-   * Supplements
-   * [ExportEvaluatedExamplesOutputConfig][google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig].
-   * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} - */ - public static final class ExportEvaluatedExamplesOutputInfo - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo) - ExportEvaluatedExamplesOutputInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportEvaluatedExamplesOutputInfo.newBuilder() to construct. - private ExportEvaluatedExamplesOutputInfo( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportEvaluatedExamplesOutputInfo() { - bigqueryOutputDataset_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportEvaluatedExamplesOutputInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportEvaluatedExamplesOutputInfo( - 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(); - - bigqueryOutputDataset_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.Builder.class); - } - - public static final int BIGQUERY_OUTPUT_DATASET_FIELD_NUMBER = 2; - private volatile java.lang.Object bigqueryOutputDataset_; - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the output of export evaluated examples is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bigqueryOutputDataset. - */ - public java.lang.String getBigqueryOutputDataset() { - java.lang.Object ref = bigqueryOutputDataset_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bigqueryOutputDataset_ = s; - return s; - } - } - /** - * - * - *
-     * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-     * format, into which the output of export evaluated examples is written.
-     * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bytes for bigqueryOutputDataset. - */ - public com.google.protobuf.ByteString getBigqueryOutputDatasetBytes() { - java.lang.Object ref = bigqueryOutputDataset_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bigqueryOutputDataset_ = 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 (!getBigqueryOutputDatasetBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bigqueryOutputDataset_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getBigqueryOutputDatasetBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bigqueryOutputDataset_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - other = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo) - obj; - - if (!getBigqueryOutputDataset().equals(other.getBigqueryOutputDataset())) return false; - if (!unknownFields.equals(other.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) + BIGQUERY_OUTPUT_DATASET_FIELD_NUMBER; - hash = (53 * hash) + getBigqueryOutputDataset().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 evaluated examples export.
-     * Supplements
-     * [ExportEvaluatedExamplesOutputConfig][google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig].
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo) - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bigqueryOutputDataset_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - build() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - buildPartial() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - result = - new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo(this); - result.bigqueryOutputDataset_ = bigqueryOutputDataset_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - other) { - if (other - == com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.getDefaultInstance()) return this; - if (!other.getBigqueryOutputDataset().isEmpty()) { - bigqueryOutputDataset_ = other.bigqueryOutputDataset_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object bigqueryOutputDataset_ = ""; - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the output of export evaluated examples is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bigqueryOutputDataset. - */ - public java.lang.String getBigqueryOutputDataset() { - java.lang.Object ref = bigqueryOutputDataset_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - bigqueryOutputDataset_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the output of export evaluated examples is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return The bytes for bigqueryOutputDataset. - */ - public com.google.protobuf.ByteString getBigqueryOutputDatasetBytes() { - java.lang.Object ref = bigqueryOutputDataset_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - bigqueryOutputDataset_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the output of export evaluated examples is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @param value The bigqueryOutputDataset to set. - * @return This builder for chaining. - */ - public Builder setBigqueryOutputDataset(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - bigqueryOutputDataset_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the output of export evaluated examples is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @return This builder for chaining. - */ - public Builder clearBigqueryOutputDataset() { - - bigqueryOutputDataset_ = getDefaultInstance().getBigqueryOutputDataset(); - onChanged(); - return this; - } - /** - * - * - *
-       * The path of the BigQuery dataset created, in bq://projectId.bqDatasetId
-       * format, into which the output of export evaluated examples is written.
-       * 
- * - * string bigquery_output_dataset = 2; - * - * @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); - - bigqueryOutputDataset_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo) - private static final com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo(); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportEvaluatedExamplesOutputInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportEvaluatedExamplesOutputInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int OUTPUT_INFO_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - outputInfo_; - /** - * - * - *
-   * Output only. Information further describing the output of this evaluated
-   * examples export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - public boolean hasOutputInfo() { - return outputInfo_ != null; - } - /** - * - * - *
-   * Output only. Information further describing the output of this evaluated
-   * examples export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - getOutputInfo() { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.getDefaultInstance() - : outputInfo_; - } - /** - * - * - *
-   * Output only. Information further describing the output of this evaluated
-   * examples export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfoOrBuilder - 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 (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 (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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata other = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) obj; - - 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 (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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 EvaluatedExamples operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder - .class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata build() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata result = - new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata(this); - 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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance()) return this; - 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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - outputInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfoOrBuilder> - outputInfoBuilder_; - /** - * - * - *
-     * Output only. Information further describing the output of this evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - public boolean hasOutputInfo() { - return outputInfoBuilder_ != null || outputInfo_ != null; - } - /** - * - * - *
-     * Output only. Information further describing the output of this evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - getOutputInfo() { - if (outputInfoBuilder_ == null) { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.getDefaultInstance() - : outputInfo_; - } else { - return outputInfoBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Information further describing the output of this evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - 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 evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.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 evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - public Builder mergeOutputInfo( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - value) { - if (outputInfoBuilder_ == null) { - if (outputInfo_ != null) { - outputInfo_ = - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.newBuilder(outputInfo_) - .mergeFrom(value) - .buildPartial(); - } else { - outputInfo_ = value; - } - onChanged(); - } else { - outputInfoBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Information further describing the output of this evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - 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 evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.Builder - getOutputInfoBuilder() { - - onChanged(); - return getOutputInfoFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Information further describing the output of this evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfoOrBuilder - getOutputInfoOrBuilder() { - if (outputInfoBuilder_ != null) { - return outputInfoBuilder_.getMessageOrBuilder(); - } else { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.getDefaultInstance() - : outputInfo_; - } - } - /** - * - * - *
-     * Output only. Information further describing the output of this evaluated
-     * examples export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfoOrBuilder> - getOutputInfoFieldBuilder() { - if (outputInfoBuilder_ == null) { - outputInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfoOrBuilder>( - 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.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - private static final com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportEvaluatedExamplesOperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportEvaluatedExamplesOperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadataOrBuilder.java deleted file mode 100644 index 6a666090e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOperationMetadataOrBuilder.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExportEvaluatedExamplesOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Information further describing the output of this evaluated
-   * examples export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - boolean hasOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing the output of this evaluated
-   * examples export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfo - getOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing the output of this evaluated
-   * examples export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.ExportEvaluatedExamplesOutputInfo output_info = 2; - * - */ - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .ExportEvaluatedExamplesOutputInfoOrBuilder - getOutputInfoOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfig.java deleted file mode 100644 index 65670b2c1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfig.java +++ /dev/null @@ -1,901 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Output configuration for ExportEvaluatedExamples Action. Note that this call
- * is available only for 30 days since the moment the model was evaluated.
- * The output depends on the domain, as follows (note that only examples from
- * the TEST set are exported):
- *  *  For Tables:
- * [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
- *       pointing to a BigQuery project must be set. In the given project a
- *       new dataset will be created with name
- * `export_evaluated_examples_<model-display-name>_<timestamp-of-export-call>`
- *       where <model-display-name> will be made BigQuery-dataset-name
- *       compatible (e.g. most special characters will become underscores),
- *       and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601"
- *       format. In the dataset an `evaluated_examples` table will be
- *       created. It will have all the same columns as the
- * [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]
- *       of the
- *       [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which
- *       the model was created, as they were at the moment of model's
- *       evaluation (this includes the target column with its ground
- *       truth), followed by a column called "predicted_<target_column>". That
- *       last column will contain the model's prediction result for each
- *       respective row, given as ARRAY of
- *       [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
- *       represented as STRUCT-s, containing
- *       [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} - */ -public final class ExportEvaluatedExamplesOutputConfig - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) - ExportEvaluatedExamplesOutputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportEvaluatedExamplesOutputConfig.newBuilder() to construct. - private ExportEvaluatedExamplesOutputConfig( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportEvaluatedExamplesOutputConfig() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportEvaluatedExamplesOutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportEvaluatedExamplesOutputConfig( - 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: - { - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = - ((com.google.cloud.automl.v1beta1.BigQueryDestination) destination_) - .toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BigQueryDestination.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.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 { - BIGQUERY_DESTINATION(2), - 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 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 BIGQUERY_DESTINATION_FIELD_NUMBER = 2; - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination() { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (destinationCase_ == 2) { - output.writeMessage(2, (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig other = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 2: - 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(); - switch (destinationCase_) { - case 2: - 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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 ExportEvaluatedExamples Action. Note that this call
-   * is available only for 30 days since the moment the model was evaluated.
-   * The output depends on the domain, as follows (note that only examples from
-   * the TEST set are exported):
-   *  *  For Tables:
-   * [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
-   *       pointing to a BigQuery project must be set. In the given project a
-   *       new dataset will be created with name
-   * `export_evaluated_examples_<model-display-name>_<timestamp-of-export-call>`
-   *       where <model-display-name> will be made BigQuery-dataset-name
-   *       compatible (e.g. most special characters will become underscores),
-   *       and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601"
-   *       format. In the dataset an `evaluated_examples` table will be
-   *       created. It will have all the same columns as the
-   * [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]
-   *       of the
-   *       [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which
-   *       the model was created, as they were at the moment of model's
-   *       evaluation (this includes the target column with its ground
-   *       truth), followed by a column called "predicted_<target_column>". That
-   *       last column will contain the model's prediction result for each
-   *       respective row, given as ARRAY of
-   *       [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload],
-   *       represented as STRUCT-s, containing
-   *       [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig build() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig buildPartial() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig result = - new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig(this); - if (destinationCase_ == 2) { - if (bigqueryDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = bigqueryDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig other) { - if (other - == com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - .getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - 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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder> - bigqueryDestinationBuilder_; - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 2) { - return bigqueryDestinationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder mergeBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2 - && destination_ - != com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.automl.v1beta1.BigQueryDestination.newBuilder( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 2) { - bigqueryDestinationBuilder_.mergeFrom(value); - } - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - } - bigqueryDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination.Builder - getBigqueryDestinationBuilder() { - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - if (!(destinationCase_ == 2)) { - destination_ = com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - bigqueryDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder>( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 2; - onChanged(); - ; - return bigqueryDestinationBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) - private static final com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig(); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportEvaluatedExamplesOutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportEvaluatedExamplesOutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfigOrBuilder.java deleted file mode 100644 index 0a514fbd4..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesOutputConfigOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExportEvaluatedExamplesOutputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination(); - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); - - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.DestinationCase - getDestinationCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequest.java deleted file mode 100644 index 32248f205..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequest.java +++ /dev/null @@ -1,973 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} - */ -public final class ExportEvaluatedExamplesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) - ExportEvaluatedExamplesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportEvaluatedExamplesRequest.newBuilder() to construct. - private ExportEvaluatedExamplesRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportEvaluatedExamplesRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportEvaluatedExamplesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportEvaluatedExamplesRequest( - 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 26: - { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.Builder - subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the model whose evaluated examples are to
-   * be exported.
-   * 
- * - * - * 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) { - 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 whose evaluated examples are to
-   * be exported.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig outputConfig_; - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfigOrBuilder - getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (outputConfig_ != null) { - output.writeMessage(3, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest other = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (hasOutputConfig() != other.hasOutputConfig()) return false; - if (hasOutputConfig()) { - if (!getOutputConfig().equals(other.getOutputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.class, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest build() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest buildPartial() { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest result = - new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest(this); - result.name_ = name_; - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest other) { - if (other - == com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) - 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 whose evaluated examples are to
-     * be exported.
-     * 
- * - * - * 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 whose evaluated examples are to
-     * be exported.
-     * 
- * - * - * 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 whose evaluated examples are to
-     * be exported.
-     * 
- * - * - * 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 whose evaluated examples are to
-     * be exported.
-     * 
- * - * - * 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 whose evaluated examples are to
-     * be exported.
-     * 
- * - * - * 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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - .getDefaultInstance() - : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig 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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeOutputConfig( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.newBuilder( - outputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.Builder - getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfigOrBuilder - getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig - .getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfigOrBuilder>( - getOutputConfig(), getParentForChildren(), isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) - private static final com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest(); - } - - public static com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportEvaluatedExamplesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportEvaluatedExamplesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequestOrBuilder.java deleted file mode 100644 index ad8a02cb8..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportEvaluatedExamplesRequestOrBuilder.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExportEvaluatedExamplesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportEvaluatedExamplesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the model whose evaluated examples are to
-   * be exported.
-   * 
- * - * - * 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 whose evaluated examples are to
-   * be exported.
-   * 
- * - * - * 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.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig getOutputConfig(); - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfigOrBuilder - getOutputConfigOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadata.java deleted file mode 100644 index e2b8aaa5e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadata.java +++ /dev/null @@ -1,1498 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of ExportModel operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportModelOperationMetadata} - */ -public final class ExportModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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 18: - { - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .Builder - subBuilder = null; - if (outputInfo_ != null) { - subBuilder = outputInfo_.toBuilder(); - } - outputInfo_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .ExportModelOutputInfo.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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder.class); - } - - public interface ExportModelOutputInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the model will be exported.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The gcsOutputDirectory. - */ - java.lang.String getGcsOutputDirectory(); - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the model will be exported.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The bytes for gcsOutputDirectory. - */ - com.google.protobuf.ByteString getGcsOutputDirectoryBytes(); - } - /** - * - * - *
-   * Further describes the output of model export.
-   * Supplements
-   * [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
-   * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} - */ - public static final class ExportModelOutputInfo extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - ExportModelOutputInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportModelOutputInfo.newBuilder() to construct. - private ExportModelOutputInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportModelOutputInfo() { - gcsOutputDirectory_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ExportModelOutputInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportModelOutputInfo( - 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(); - - 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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .class, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .Builder.class); - } - - public static final int GCS_OUTPUT_DIRECTORY_FIELD_NUMBER = 1; - private volatile java.lang.Object gcsOutputDirectory_; - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the model will be exported.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The gcsOutputDirectory. - */ - 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; - } - } - /** - * - * - *
-     * The full path of the Google Cloud Storage directory created, into which
-     * the model will be exported.
-     * 
- * - * string gcs_output_directory = 1; - * - * @return The bytes for gcsOutputDirectory. - */ - 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 (!getGcsOutputDirectoryBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, gcsOutputDirectory_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getGcsOutputDirectoryBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, 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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo other = - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) obj; - - 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(); - 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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 model export.
-     * Supplements
-     * [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig].
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .ExportModelOutputInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .class, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - gcsOutputDirectory_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - build() { - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - buildPartial() { - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo result = - new com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo( - this); - 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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - other) { - if (other - == com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .getDefaultInstance()) return this; - 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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object gcsOutputDirectory_ = ""; - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the model will be exported.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the model will be exported.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the model will be exported.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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; - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the model will be exported.
-       * 
- * - * string gcs_output_directory = 1; - * - * @return This builder for chaining. - */ - public Builder clearGcsOutputDirectory() { - - gcsOutputDirectory_ = getDefaultInstance().getGcsOutputDirectory(); - onChanged(); - return this; - } - /** - * - * - *
-       * The full path of the Google Cloud Storage directory created, into which
-       * the model will be exported.
-       * 
- * - * string gcs_output_directory = 1; - * - * @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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo) - private static final com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .ExportModelOutputInfo - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo(); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportModelOutputInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportModelOutputInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int OUTPUT_INFO_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - outputInfo_; - /** - * - * - *
-   * Output only. Information further describing the output of this model
-   * export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - public boolean hasOutputInfo() { - return outputInfo_ != null; - } - /** - * - * - *
-   * Output only. Information further describing the output of this model
-   * export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - getOutputInfo() { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .getDefaultInstance() - : outputInfo_; - } - /** - * - * - *
-   * Output only. Information further describing the output of this model
-   * export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfoOrBuilder - 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 (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 (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.automl.v1beta1.ExportModelOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata other = - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) obj; - - 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 (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.automl.v1beta1.ExportModelOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportModelOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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 ExportModel operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportModelOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportModelOperationMetadata) - com.google.cloud.automl.v1beta1.ExportModelOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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 (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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata build() { - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata result = - new com.google.cloud.automl.v1beta1.ExportModelOperationMetadata(this); - 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.automl.v1beta1.ExportModelOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ExportModelOperationMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance()) - return this; - 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.automl.v1beta1.ExportModelOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - outputInfo_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .ExportModelOutputInfoOrBuilder> - outputInfoBuilder_; - /** - * - * - *
-     * Output only. Information further describing the output of this model
-     * export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - * - * @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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - getOutputInfo() { - if (outputInfoBuilder_ == null) { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .getDefaultInstance() - : outputInfo_; - } else { - return outputInfoBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Information further describing the output of this model
-     * export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo 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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - public Builder setOutputInfo( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo.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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - public Builder mergeOutputInfo( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo value) { - if (outputInfoBuilder_ == null) { - if (outputInfo_ != null) { - outputInfo_ = - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - 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.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .Builder - getOutputInfoBuilder() { - - onChanged(); - return getOutputInfoFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Information further describing the output of this model
-     * export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .ExportModelOutputInfoOrBuilder - getOutputInfoOrBuilder() { - if (outputInfoBuilder_ != null) { - return outputInfoBuilder_.getMessageOrBuilder(); - } else { - return outputInfo_ == null - ? com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .getDefaultInstance() - : outputInfo_; - } - } - /** - * - * - *
-     * Output only. Information further describing the output of this model
-     * export.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .ExportModelOutputInfoOrBuilder> - getOutputInfoFieldBuilder() { - if (outputInfoBuilder_ == null) { - outputInfoBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - .Builder, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .ExportModelOutputInfoOrBuilder>( - 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.automl.v1beta1.ExportModelOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportModelOperationMetadata) - private static final com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ExportModelOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadataOrBuilder.java deleted file mode 100644 index 1b0259539..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelOperationMetadataOrBuilder.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExportModelOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportModelOperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Information further describing the output of this model
-   * export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - * - * @return Whether the outputInfo field is set. - */ - boolean hasOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing the output of this model
-   * export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - * - * @return The outputInfo. - */ - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo - getOutputInfo(); - /** - * - * - *
-   * Output only. Information further describing the output of this model
-   * export.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfo output_info = 2; - * - */ - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.ExportModelOutputInfoOrBuilder - getOutputInfoOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequest.java deleted file mode 100644 index 6b37ed75a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequest.java +++ /dev/null @@ -1,956 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel].
- * Models need to be enabled for exporting, otherwise an error code will be
- * returned.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportModelRequest} - */ -public final class ExportModelRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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 26: - { - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportModelRequest.class, - com.google.cloud.automl.v1beta1.ExportModelRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the model to export.
-   * 
- * - * - * 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) { - 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.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.ModelExportOutputConfig outputConfig_; - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.ModelExportOutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ModelExportOutputConfigOrBuilder - getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (outputConfig_ != null) { - output.writeMessage(3, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ExportModelRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ExportModelRequest other = - (com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ExportModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ExportModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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 [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel].
-   * Models need to be enabled for exporting, otherwise an error code will be
-   * returned.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ExportModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ExportModelRequest) - com.google.cloud.automl.v1beta1.ExportModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ExportModelRequest.class, - com.google.cloud.automl.v1beta1.ExportModelRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ExportModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ExportModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelRequest build() { - com.google.cloud.automl.v1beta1.ExportModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ExportModelRequest buildPartial() { - com.google.cloud.automl.v1beta1.ExportModelRequest result = - new com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ExportModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ExportModelRequest other) { - if (other == com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.
-     * 
- * - * - * 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.automl.v1beta1.ModelExportOutputConfig outputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ModelExportOutputConfig, - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.Builder, - com.google.cloud.automl.v1beta1.ModelExportOutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.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.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.ModelExportOutputConfig.getDefaultInstance() - : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig(com.google.cloud.automl.v1beta1.ModelExportOutputConfig 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.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setOutputConfig( - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.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.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeOutputConfig( - com.google.cloud.automl.v1beta1.ModelExportOutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.newBuilder(outputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.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.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig.Builder - getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ModelExportOutputConfigOrBuilder - getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.automl.v1beta1.ModelExportOutputConfig.getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Required. The desired output location and configuration.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ModelExportOutputConfig, - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.Builder, - com.google.cloud.automl.v1beta1.ModelExportOutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ModelExportOutputConfig, - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.Builder, - com.google.cloud.automl.v1beta1.ModelExportOutputConfigOrBuilder>( - getOutputConfig(), getParentForChildren(), isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ExportModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ExportModelRequest) - private static final com.google.cloud.automl.v1beta1.ExportModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ExportModelRequest(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ExportModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequestOrBuilder.java deleted file mode 100644 index dfff31450..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ExportModelRequestOrBuilder.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ExportModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ExportModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the model to export.
-   * 
- * - * - * 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.
-   * 
- * - * - * 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.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the outputConfig field is set. - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The outputConfig. - */ - com.google.cloud.automl.v1beta1.ModelExportOutputConfig getOutputConfig(); - /** - * - * - *
-   * Required. The desired output location and configuration.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ModelExportOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.ModelExportOutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64Stats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64Stats.java deleted file mode 100644 index c76d6ac99..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64Stats.java +++ /dev/null @@ -1,2332 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The data statistics of a series of FLOAT64 values.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats} - */ -public final class Float64Stats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Float64Stats) - Float64StatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use Float64Stats.newBuilder() to construct. - private Float64Stats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Float64Stats() { - quantiles_ = emptyDoubleList(); - histogramBuckets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Float64Stats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Float64Stats( - 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: - { - mean_ = input.readDouble(); - break; - } - case 17: - { - standardDeviation_ = input.readDouble(); - break; - } - case 25: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - quantiles_ = newDoubleList(); - mutable_bitField0_ |= 0x00000001; - } - quantiles_.addDouble(input.readDouble()); - break; - } - case 26: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - quantiles_ = newDoubleList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - quantiles_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - histogramBuckets_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket>(); - mutable_bitField0_ |= 0x00000002; - } - histogramBuckets_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.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)) { - quantiles_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - histogramBuckets_ = java.util.Collections.unmodifiableList(histogramBuckets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Float64Stats.class, - com.google.cloud.automl.v1beta1.Float64Stats.Builder.class); - } - - public interface HistogramBucketOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The minimum value of the bucket, inclusive.
-     * 
- * - * double min = 1; - * - * @return The min. - */ - double getMin(); - - /** - * - * - *
-     * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
-     * which case it's inclusive.
-     * 
- * - * double max = 2; - * - * @return The max. - */ - double getMax(); - - /** - * - * - *
-     * The number of data values that are in the bucket, i.e. are between
-     * min and max values.
-     * 
- * - * int64 count = 3; - * - * @return The count. - */ - long getCount(); - } - /** - * - * - *
-   * A bucket of a histogram.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} - */ - public static final class HistogramBucket extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) - HistogramBucketOrBuilder { - private static final long serialVersionUID = 0L; - // Use HistogramBucket.newBuilder() to construct. - private HistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HistogramBucket() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HistogramBucket(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private HistogramBucket( - 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: - { - min_ = input.readDouble(); - break; - } - case 17: - { - max_ = input.readDouble(); - break; - } - case 24: - { - count_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.class, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder.class); - } - - public static final int MIN_FIELD_NUMBER = 1; - private double min_; - /** - * - * - *
-     * The minimum value of the bucket, inclusive.
-     * 
- * - * double min = 1; - * - * @return The min. - */ - public double getMin() { - return min_; - } - - public static final int MAX_FIELD_NUMBER = 2; - private double max_; - /** - * - * - *
-     * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
-     * which case it's inclusive.
-     * 
- * - * double max = 2; - * - * @return The max. - */ - public double getMax() { - return max_; - } - - public static final int COUNT_FIELD_NUMBER = 3; - private long count_; - /** - * - * - *
-     * The number of data values that are in the bucket, i.e. are between
-     * min and max values.
-     * 
- * - * int64 count = 3; - * - * @return The count. - */ - public long getCount() { - return count_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (min_ != 0D) { - output.writeDouble(1, min_); - } - if (max_ != 0D) { - output.writeDouble(2, max_); - } - if (count_ != 0L) { - output.writeInt64(3, count_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (min_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, min_); - } - if (max_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, max_); - } - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, count_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket other = - (com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) obj; - - if (java.lang.Double.doubleToLongBits(getMin()) - != java.lang.Double.doubleToLongBits(other.getMin())) return false; - if (java.lang.Double.doubleToLongBits(getMax()) - != java.lang.Double.doubleToLongBits(other.getMax())) return false; - if (getCount() != other.getCount()) return false; - if (!unknownFields.equals(other.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_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMin())); - hash = (37 * hash) + MAX_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMax())); - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 bucket of a histogram.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats.HistogramBucket} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.class, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - min_ = 0D; - - max_ = 0D; - - count_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_HistogramBucket_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket build() { - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket buildPartial() { - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket result = - new com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket(this); - result.min_ = min_; - result.max_ = max_; - result.count_ = count_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) { - return mergeFrom((com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket other) { - if (other - == com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance()) - return this; - if (other.getMin() != 0D) { - setMin(other.getMin()); - } - if (other.getMax() != 0D) { - setMax(other.getMax()); - } - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double min_; - /** - * - * - *
-       * The minimum value of the bucket, inclusive.
-       * 
- * - * double min = 1; - * - * @return The min. - */ - public double getMin() { - return min_; - } - /** - * - * - *
-       * The minimum value of the bucket, inclusive.
-       * 
- * - * double min = 1; - * - * @param value The min to set. - * @return This builder for chaining. - */ - public Builder setMin(double value) { - - min_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The minimum value of the bucket, inclusive.
-       * 
- * - * double min = 1; - * - * @return This builder for chaining. - */ - public Builder clearMin() { - - min_ = 0D; - onChanged(); - return this; - } - - private double max_; - /** - * - * - *
-       * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
-       * which case it's inclusive.
-       * 
- * - * double max = 2; - * - * @return The max. - */ - public double getMax() { - return max_; - } - /** - * - * - *
-       * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
-       * which case it's inclusive.
-       * 
- * - * double max = 2; - * - * @param value The max to set. - * @return This builder for chaining. - */ - public Builder setMax(double value) { - - max_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The maximum value of the bucket, exclusive unless max = `"Infinity"`, in
-       * which case it's inclusive.
-       * 
- * - * double max = 2; - * - * @return This builder for chaining. - */ - public Builder clearMax() { - - max_ = 0D; - onChanged(); - return this; - } - - private long count_; - /** - * - * - *
-       * The number of data values that are in the bucket, i.e. are between
-       * min and max values.
-       * 
- * - * int64 count = 3; - * - * @return The count. - */ - public long getCount() { - return count_; - } - /** - * - * - *
-       * The number of data values that are in the bucket, i.e. are between
-       * min and max values.
-       * 
- * - * int64 count = 3; - * - * @param value The count to set. - * @return This builder for chaining. - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The number of data values that are in the bucket, i.e. are between
-       * min and max values.
-       * 
- * - * int64 count = 3; - * - * @return This builder for chaining. - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Float64Stats.HistogramBucket) - private static final com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket(); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HistogramBucket parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new HistogramBucket(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int MEAN_FIELD_NUMBER = 1; - private double mean_; - /** - * - * - *
-   * The mean of the series.
-   * 
- * - * double mean = 1; - * - * @return The mean. - */ - public double getMean() { - return mean_; - } - - public static final int STANDARD_DEVIATION_FIELD_NUMBER = 2; - private double standardDeviation_; - /** - * - * - *
-   * The standard deviation of the series.
-   * 
- * - * double standard_deviation = 2; - * - * @return The standardDeviation. - */ - public double getStandardDeviation() { - return standardDeviation_; - } - - public static final int QUANTILES_FIELD_NUMBER = 3; - private com.google.protobuf.Internal.DoubleList quantiles_; - /** - * - * - *
-   * Ordered from 0 to k k-quantile values of the data series of n values.
-   * The value at index i is, approximately, the i*n/k-th smallest value in the
-   * series; for i = 0 and i = k these are, respectively, the min and max
-   * values.
-   * 
- * - * repeated double quantiles = 3; - * - * @return A list containing the quantiles. - */ - public java.util.List getQuantilesList() { - return quantiles_; - } - /** - * - * - *
-   * Ordered from 0 to k k-quantile values of the data series of n values.
-   * The value at index i is, approximately, the i*n/k-th smallest value in the
-   * series; for i = 0 and i = k these are, respectively, the min and max
-   * values.
-   * 
- * - * repeated double quantiles = 3; - * - * @return The count of quantiles. - */ - public int getQuantilesCount() { - return quantiles_.size(); - } - /** - * - * - *
-   * Ordered from 0 to k k-quantile values of the data series of n values.
-   * The value at index i is, approximately, the i*n/k-th smallest value in the
-   * series; for i = 0 and i = k these are, respectively, the min and max
-   * values.
-   * 
- * - * repeated double quantiles = 3; - * - * @param index The index of the element to return. - * @return The quantiles at the given index. - */ - public double getQuantiles(int index) { - return quantiles_.getDouble(index); - } - - private int quantilesMemoizedSerializedSize = -1; - - public static final int HISTOGRAM_BUCKETS_FIELD_NUMBER = 4; - private java.util.List - histogramBuckets_; - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public java.util.List - getHistogramBucketsList() { - return histogramBuckets_; - } - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder> - getHistogramBucketsOrBuilderList() { - return histogramBuckets_; - } - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public int getHistogramBucketsCount() { - return histogramBuckets_.size(); - } - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket getHistogramBuckets( - int index) { - return histogramBuckets_.get(index); - } - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder - getHistogramBucketsOrBuilder(int index) { - return histogramBuckets_.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 (mean_ != 0D) { - output.writeDouble(1, mean_); - } - if (standardDeviation_ != 0D) { - output.writeDouble(2, standardDeviation_); - } - if (getQuantilesList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(quantilesMemoizedSerializedSize); - } - for (int i = 0; i < quantiles_.size(); i++) { - output.writeDoubleNoTag(quantiles_.getDouble(i)); - } - for (int i = 0; i < histogramBuckets_.size(); i++) { - output.writeMessage(4, histogramBuckets_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (mean_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, mean_); - } - if (standardDeviation_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, standardDeviation_); - } - { - int dataSize = 0; - dataSize = 8 * getQuantilesList().size(); - size += dataSize; - if (!getQuantilesList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize); - } - quantilesMemoizedSerializedSize = dataSize; - } - for (int i = 0; i < histogramBuckets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, histogramBuckets_.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.automl.v1beta1.Float64Stats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Float64Stats other = - (com.google.cloud.automl.v1beta1.Float64Stats) obj; - - if (java.lang.Double.doubleToLongBits(getMean()) - != java.lang.Double.doubleToLongBits(other.getMean())) return false; - if (java.lang.Double.doubleToLongBits(getStandardDeviation()) - != java.lang.Double.doubleToLongBits(other.getStandardDeviation())) return false; - if (!getQuantilesList().equals(other.getQuantilesList())) return false; - if (!getHistogramBucketsList().equals(other.getHistogramBucketsList())) return false; - if (!unknownFields.equals(other.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) + MEAN_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getMean())); - hash = (37 * hash) + STANDARD_DEVIATION_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getStandardDeviation())); - if (getQuantilesCount() > 0) { - hash = (37 * hash) + QUANTILES_FIELD_NUMBER; - hash = (53 * hash) + getQuantilesList().hashCode(); - } - if (getHistogramBucketsCount() > 0) { - hash = (37 * hash) + HISTOGRAM_BUCKETS_FIELD_NUMBER; - hash = (53 * hash) + getHistogramBucketsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.Float64Stats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data statistics of a series of FLOAT64 values.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Float64Stats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Float64Stats) - com.google.cloud.automl.v1beta1.Float64StatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Float64Stats.class, - com.google.cloud.automl.v1beta1.Float64Stats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Float64Stats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getHistogramBucketsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - mean_ = 0D; - - standardDeviation_ = 0D; - - quantiles_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (histogramBucketsBuilder_ == null) { - histogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - histogramBucketsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_Float64Stats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats build() { - com.google.cloud.automl.v1beta1.Float64Stats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats buildPartial() { - com.google.cloud.automl.v1beta1.Float64Stats result = - new com.google.cloud.automl.v1beta1.Float64Stats(this); - int from_bitField0_ = bitField0_; - result.mean_ = mean_; - result.standardDeviation_ = standardDeviation_; - if (((bitField0_ & 0x00000001) != 0)) { - quantiles_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.quantiles_ = quantiles_; - if (histogramBucketsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - histogramBuckets_ = java.util.Collections.unmodifiableList(histogramBuckets_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.histogramBuckets_ = histogramBuckets_; - } else { - result.histogramBuckets_ = histogramBucketsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Float64Stats) { - return mergeFrom((com.google.cloud.automl.v1beta1.Float64Stats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Float64Stats other) { - if (other == com.google.cloud.automl.v1beta1.Float64Stats.getDefaultInstance()) return this; - if (other.getMean() != 0D) { - setMean(other.getMean()); - } - if (other.getStandardDeviation() != 0D) { - setStandardDeviation(other.getStandardDeviation()); - } - if (!other.quantiles_.isEmpty()) { - if (quantiles_.isEmpty()) { - quantiles_ = other.quantiles_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureQuantilesIsMutable(); - quantiles_.addAll(other.quantiles_); - } - onChanged(); - } - if (histogramBucketsBuilder_ == null) { - if (!other.histogramBuckets_.isEmpty()) { - if (histogramBuckets_.isEmpty()) { - histogramBuckets_ = other.histogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureHistogramBucketsIsMutable(); - histogramBuckets_.addAll(other.histogramBuckets_); - } - onChanged(); - } - } else { - if (!other.histogramBuckets_.isEmpty()) { - if (histogramBucketsBuilder_.isEmpty()) { - histogramBucketsBuilder_.dispose(); - histogramBucketsBuilder_ = null; - histogramBuckets_ = other.histogramBuckets_; - bitField0_ = (bitField0_ & ~0x00000002); - histogramBucketsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getHistogramBucketsFieldBuilder() - : null; - } else { - histogramBucketsBuilder_.addAllMessages(other.histogramBuckets_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Float64Stats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.Float64Stats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private double mean_; - /** - * - * - *
-     * The mean of the series.
-     * 
- * - * double mean = 1; - * - * @return The mean. - */ - public double getMean() { - return mean_; - } - /** - * - * - *
-     * The mean of the series.
-     * 
- * - * double mean = 1; - * - * @param value The mean to set. - * @return This builder for chaining. - */ - public Builder setMean(double value) { - - mean_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The mean of the series.
-     * 
- * - * double mean = 1; - * - * @return This builder for chaining. - */ - public Builder clearMean() { - - mean_ = 0D; - onChanged(); - return this; - } - - private double standardDeviation_; - /** - * - * - *
-     * The standard deviation of the series.
-     * 
- * - * double standard_deviation = 2; - * - * @return The standardDeviation. - */ - public double getStandardDeviation() { - return standardDeviation_; - } - /** - * - * - *
-     * The standard deviation of the series.
-     * 
- * - * double standard_deviation = 2; - * - * @param value The standardDeviation to set. - * @return This builder for chaining. - */ - public Builder setStandardDeviation(double value) { - - standardDeviation_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The standard deviation of the series.
-     * 
- * - * double standard_deviation = 2; - * - * @return This builder for chaining. - */ - public Builder clearStandardDeviation() { - - standardDeviation_ = 0D; - onChanged(); - return this; - } - - private com.google.protobuf.Internal.DoubleList quantiles_ = emptyDoubleList(); - - private void ensureQuantilesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - quantiles_ = mutableCopy(quantiles_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Ordered from 0 to k k-quantile values of the data series of n values.
-     * The value at index i is, approximately, the i*n/k-th smallest value in the
-     * series; for i = 0 and i = k these are, respectively, the min and max
-     * values.
-     * 
- * - * repeated double quantiles = 3; - * - * @return A list containing the quantiles. - */ - public java.util.List getQuantilesList() { - return ((bitField0_ & 0x00000001) != 0) - ? java.util.Collections.unmodifiableList(quantiles_) - : quantiles_; - } - /** - * - * - *
-     * Ordered from 0 to k k-quantile values of the data series of n values.
-     * The value at index i is, approximately, the i*n/k-th smallest value in the
-     * series; for i = 0 and i = k these are, respectively, the min and max
-     * values.
-     * 
- * - * repeated double quantiles = 3; - * - * @return The count of quantiles. - */ - public int getQuantilesCount() { - return quantiles_.size(); - } - /** - * - * - *
-     * Ordered from 0 to k k-quantile values of the data series of n values.
-     * The value at index i is, approximately, the i*n/k-th smallest value in the
-     * series; for i = 0 and i = k these are, respectively, the min and max
-     * values.
-     * 
- * - * repeated double quantiles = 3; - * - * @param index The index of the element to return. - * @return The quantiles at the given index. - */ - public double getQuantiles(int index) { - return quantiles_.getDouble(index); - } - /** - * - * - *
-     * Ordered from 0 to k k-quantile values of the data series of n values.
-     * The value at index i is, approximately, the i*n/k-th smallest value in the
-     * series; for i = 0 and i = k these are, respectively, the min and max
-     * values.
-     * 
- * - * repeated double quantiles = 3; - * - * @param index The index to set the value at. - * @param value The quantiles to set. - * @return This builder for chaining. - */ - public Builder setQuantiles(int index, double value) { - ensureQuantilesIsMutable(); - quantiles_.setDouble(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Ordered from 0 to k k-quantile values of the data series of n values.
-     * The value at index i is, approximately, the i*n/k-th smallest value in the
-     * series; for i = 0 and i = k these are, respectively, the min and max
-     * values.
-     * 
- * - * repeated double quantiles = 3; - * - * @param value The quantiles to add. - * @return This builder for chaining. - */ - public Builder addQuantiles(double value) { - ensureQuantilesIsMutable(); - quantiles_.addDouble(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Ordered from 0 to k k-quantile values of the data series of n values.
-     * The value at index i is, approximately, the i*n/k-th smallest value in the
-     * series; for i = 0 and i = k these are, respectively, the min and max
-     * values.
-     * 
- * - * repeated double quantiles = 3; - * - * @param values The quantiles to add. - * @return This builder for chaining. - */ - public Builder addAllQuantiles(java.lang.Iterable values) { - ensureQuantilesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, quantiles_); - onChanged(); - return this; - } - /** - * - * - *
-     * Ordered from 0 to k k-quantile values of the data series of n values.
-     * The value at index i is, approximately, the i*n/k-th smallest value in the
-     * series; for i = 0 and i = k these are, respectively, the min and max
-     * values.
-     * 
- * - * repeated double quantiles = 3; - * - * @return This builder for chaining. - */ - public Builder clearQuantiles() { - quantiles_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - - private java.util.List - histogramBuckets_ = java.util.Collections.emptyList(); - - private void ensureHistogramBucketsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - histogramBuckets_ = - new java.util.ArrayList( - histogramBuckets_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder> - histogramBucketsBuilder_; - - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public java.util.List - getHistogramBucketsList() { - if (histogramBucketsBuilder_ == null) { - return java.util.Collections.unmodifiableList(histogramBuckets_); - } else { - return histogramBucketsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public int getHistogramBucketsCount() { - if (histogramBucketsBuilder_ == null) { - return histogramBuckets_.size(); - } else { - return histogramBucketsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket getHistogramBuckets( - int index) { - if (histogramBucketsBuilder_ == null) { - return histogramBuckets_.get(index); - } else { - return histogramBucketsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder setHistogramBuckets( - int index, com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket value) { - if (histogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHistogramBucketsIsMutable(); - histogramBuckets_.set(index, value); - onChanged(); - } else { - histogramBucketsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder setHistogramBuckets( - int index, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder builderForValue) { - if (histogramBucketsBuilder_ == null) { - ensureHistogramBucketsIsMutable(); - histogramBuckets_.set(index, builderForValue.build()); - onChanged(); - } else { - histogramBucketsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder addHistogramBuckets( - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket value) { - if (histogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHistogramBucketsIsMutable(); - histogramBuckets_.add(value); - onChanged(); - } else { - histogramBucketsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder addHistogramBuckets( - int index, com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket value) { - if (histogramBucketsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHistogramBucketsIsMutable(); - histogramBuckets_.add(index, value); - onChanged(); - } else { - histogramBucketsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder addHistogramBuckets( - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder builderForValue) { - if (histogramBucketsBuilder_ == null) { - ensureHistogramBucketsIsMutable(); - histogramBuckets_.add(builderForValue.build()); - onChanged(); - } else { - histogramBucketsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder addHistogramBuckets( - int index, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder builderForValue) { - if (histogramBucketsBuilder_ == null) { - ensureHistogramBucketsIsMutable(); - histogramBuckets_.add(index, builderForValue.build()); - onChanged(); - } else { - histogramBucketsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder addAllHistogramBuckets( - java.lang.Iterable - values) { - if (histogramBucketsBuilder_ == null) { - ensureHistogramBucketsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, histogramBuckets_); - onChanged(); - } else { - histogramBucketsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder clearHistogramBuckets() { - if (histogramBucketsBuilder_ == null) { - histogramBuckets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - histogramBucketsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public Builder removeHistogramBuckets(int index) { - if (histogramBucketsBuilder_ == null) { - ensureHistogramBucketsIsMutable(); - histogramBuckets_.remove(index); - onChanged(); - } else { - histogramBucketsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder - getHistogramBucketsBuilder(int index) { - return getHistogramBucketsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder - getHistogramBucketsOrBuilder(int index) { - if (histogramBucketsBuilder_ == null) { - return histogramBuckets_.get(index); - } else { - return histogramBucketsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder> - getHistogramBucketsOrBuilderList() { - if (histogramBucketsBuilder_ != null) { - return histogramBucketsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(histogramBuckets_); - } - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder - addHistogramBucketsBuilder() { - return getHistogramBucketsFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance()); - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder - addHistogramBucketsBuilder(int index) { - return getHistogramBucketsFieldBuilder() - .addBuilder( - index, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.getDefaultInstance()); - } - /** - * - * - *
-     * Histogram buckets of the data series. Sorted by the min value of the
-     * bucket, ascendingly, and the number of the buckets is dynamically
-     * generated. The buckets are non-overlapping and completely cover whole
-     * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-     * the last one being `"Infinity"`.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - public java.util.List - getHistogramBucketsBuilderList() { - return getHistogramBucketsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder> - getHistogramBucketsFieldBuilder() { - if (histogramBucketsBuilder_ == null) { - histogramBucketsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket.Builder, - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder>( - histogramBuckets_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - histogramBuckets_ = null; - } - return histogramBucketsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Float64Stats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Float64Stats) - private static final com.google.cloud.automl.v1beta1.Float64Stats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Float64Stats(); - } - - public static com.google.cloud.automl.v1beta1.Float64Stats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Float64Stats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Float64Stats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Float64Stats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64StatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64StatsOrBuilder.java deleted file mode 100644 index d10104ccc..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Float64StatsOrBuilder.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface Float64StatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Float64Stats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The mean of the series.
-   * 
- * - * double mean = 1; - * - * @return The mean. - */ - double getMean(); - - /** - * - * - *
-   * The standard deviation of the series.
-   * 
- * - * double standard_deviation = 2; - * - * @return The standardDeviation. - */ - double getStandardDeviation(); - - /** - * - * - *
-   * Ordered from 0 to k k-quantile values of the data series of n values.
-   * The value at index i is, approximately, the i*n/k-th smallest value in the
-   * series; for i = 0 and i = k these are, respectively, the min and max
-   * values.
-   * 
- * - * repeated double quantiles = 3; - * - * @return A list containing the quantiles. - */ - java.util.List getQuantilesList(); - /** - * - * - *
-   * Ordered from 0 to k k-quantile values of the data series of n values.
-   * The value at index i is, approximately, the i*n/k-th smallest value in the
-   * series; for i = 0 and i = k these are, respectively, the min and max
-   * values.
-   * 
- * - * repeated double quantiles = 3; - * - * @return The count of quantiles. - */ - int getQuantilesCount(); - /** - * - * - *
-   * Ordered from 0 to k k-quantile values of the data series of n values.
-   * The value at index i is, approximately, the i*n/k-th smallest value in the
-   * series; for i = 0 and i = k these are, respectively, the min and max
-   * values.
-   * 
- * - * repeated double quantiles = 3; - * - * @param index The index of the element to return. - * @return The quantiles at the given index. - */ - double getQuantiles(int index); - - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - java.util.List - getHistogramBucketsList(); - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucket getHistogramBuckets(int index); - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - int getHistogramBucketsCount(); - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - java.util.List - getHistogramBucketsOrBuilderList(); - /** - * - * - *
-   * Histogram buckets of the data series. Sorted by the min value of the
-   * bucket, ascendingly, and the number of the buckets is dynamically
-   * generated. The buckets are non-overlapping and completely cover whole
-   * FLOAT64 range with min of first bucket being `"-Infinity"`, and max of
-   * the last one being `"Infinity"`.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Float64Stats.HistogramBucket histogram_buckets = 4; - * - */ - com.google.cloud.automl.v1beta1.Float64Stats.HistogramBucketOrBuilder - getHistogramBucketsOrBuilder(int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestination.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestination.java deleted file mode 100644 index 820249639..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestination.java +++ /dev/null @@ -1,688 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The GCR location where the image must be pushed to.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GcrDestination} - */ -public final class GcrDestination extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.GcrDestination) - GcrDestinationOrBuilder { - private static final long serialVersionUID = 0L; - // Use GcrDestination.newBuilder() to construct. - private GcrDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GcrDestination() { - outputUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GcrDestination(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GcrDestination( - 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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcrDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcrDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GcrDestination.class, - com.google.cloud.automl.v1beta1.GcrDestination.Builder.class); - } - - public static final int OUTPUT_URI_FIELD_NUMBER = 1; - private volatile java.lang.Object outputUri_; - /** - * - * - *
-   * Required. Google Contained Registry URI of the new image, up to 2000
-   * characters long. See
-   * https:
-   * //cloud.google.com/container-registry/do
-   * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-   * Accepted forms:
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-   * The requesting user must have permission to push images the project.
-   * 
- * - * string output_uri = 1; - * - * @return The outputUri. - */ - 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. Google Contained Registry URI of the new image, up to 2000
-   * characters long. See
-   * https:
-   * //cloud.google.com/container-registry/do
-   * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-   * Accepted forms:
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-   * The requesting user must have permission to push images the project.
-   * 
- * - * string output_uri = 1; - * - * @return The bytes for outputUri. - */ - 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.automl.v1beta1.GcrDestination)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GcrDestination other = - (com.google.cloud.automl.v1beta1.GcrDestination) 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.automl.v1beta1.GcrDestination parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.GcrDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 GCR location where the image must be pushed to.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GcrDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GcrDestination) - com.google.cloud.automl.v1beta1.GcrDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcrDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcrDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GcrDestination.class, - com.google.cloud.automl.v1beta1.GcrDestination.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GcrDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcrDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcrDestination getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcrDestination build() { - com.google.cloud.automl.v1beta1.GcrDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcrDestination buildPartial() { - com.google.cloud.automl.v1beta1.GcrDestination result = - new com.google.cloud.automl.v1beta1.GcrDestination(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.automl.v1beta1.GcrDestination) { - return mergeFrom((com.google.cloud.automl.v1beta1.GcrDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GcrDestination other) { - if (other == com.google.cloud.automl.v1beta1.GcrDestination.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.automl.v1beta1.GcrDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.GcrDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object outputUri_ = ""; - /** - * - * - *
-     * Required. Google Contained Registry URI of the new image, up to 2000
-     * characters long. See
-     * https:
-     * //cloud.google.com/container-registry/do
-     * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-     * Accepted forms:
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-     * The requesting user must have permission to push images the project.
-     * 
- * - * string output_uri = 1; - * - * @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. Google Contained Registry URI of the new image, up to 2000
-     * characters long. See
-     * https:
-     * //cloud.google.com/container-registry/do
-     * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-     * Accepted forms:
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-     * The requesting user must have permission to push images the project.
-     * 
- * - * string output_uri = 1; - * - * @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. Google Contained Registry URI of the new image, up to 2000
-     * characters long. See
-     * https:
-     * //cloud.google.com/container-registry/do
-     * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-     * Accepted forms:
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-     * The requesting user must have permission to push images the project.
-     * 
- * - * string output_uri = 1; - * - * @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. Google Contained Registry URI of the new image, up to 2000
-     * characters long. See
-     * https:
-     * //cloud.google.com/container-registry/do
-     * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-     * Accepted forms:
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-     * The requesting user must have permission to push images the project.
-     * 
- * - * string output_uri = 1; - * - * @return This builder for chaining. - */ - public Builder clearOutputUri() { - - outputUri_ = getDefaultInstance().getOutputUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Google Contained Registry URI of the new image, up to 2000
-     * characters long. See
-     * https:
-     * //cloud.google.com/container-registry/do
-     * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-     * Accepted forms:
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-     * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-     * The requesting user must have permission to push images the project.
-     * 
- * - * string output_uri = 1; - * - * @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.automl.v1beta1.GcrDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GcrDestination) - private static final com.google.cloud.automl.v1beta1.GcrDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GcrDestination(); - } - - public static com.google.cloud.automl.v1beta1.GcrDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcrDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcrDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcrDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestinationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestinationOrBuilder.java deleted file mode 100644 index f5a9b28e2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcrDestinationOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface GcrDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GcrDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Contained Registry URI of the new image, up to 2000
-   * characters long. See
-   * https:
-   * //cloud.google.com/container-registry/do
-   * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-   * Accepted forms:
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-   * The requesting user must have permission to push images the project.
-   * 
- * - * string output_uri = 1; - * - * @return The outputUri. - */ - java.lang.String getOutputUri(); - /** - * - * - *
-   * Required. Google Contained Registry URI of the new image, up to 2000
-   * characters long. See
-   * https:
-   * //cloud.google.com/container-registry/do
-   * // cs/pushing-and-pulling#pushing_an_image_to_a_registry
-   * Accepted forms:
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]
-   * * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]
-   * The requesting user must have permission to push images the project.
-   * 
- * - * string output_uri = 1; - * - * @return The bytes for outputUri. - */ - com.google.protobuf.ByteString getOutputUriBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestination.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestination.java deleted file mode 100644 index 6f0d4c928..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestination.java +++ /dev/null @@ -1,667 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The Google Cloud Storage location where the output is to be written to.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GcsDestination} - */ -public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GcsDestination.class, - com.google.cloud.automl.v1beta1.GcsDestination.Builder.class); - } - - public static final int OUTPUT_URI_PREFIX_FIELD_NUMBER = 1; - private volatile java.lang.Object outputUriPrefix_; - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory, up to 2000
-   * characters long.
-   * Accepted forms:
-   * * Prefix path: gs://bucket/directory
-   * The requesting user must have write permission to the bucket.
-   * The directory is created if it doesn't exist.
-   * 
- * - * string output_uri_prefix = 1; - * - * @return The outputUriPrefix. - */ - public java.lang.String getOutputUriPrefix() { - java.lang.Object ref = outputUriPrefix_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - outputUriPrefix_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory, up to 2000
-   * characters long.
-   * Accepted forms:
-   * * Prefix path: gs://bucket/directory
-   * The requesting user must have write permission to the bucket.
-   * The directory is created if it doesn't exist.
-   * 
- * - * string output_uri_prefix = 1; - * - * @return The bytes for outputUriPrefix. - */ - public com.google.protobuf.ByteString getOutputUriPrefixBytes() { - java.lang.Object ref = outputUriPrefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - outputUriPrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getOutputUriPrefixBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputUriPrefix_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getOutputUriPrefixBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputUriPrefix_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GcsDestination other = - (com.google.cloud.automl.v1beta1.GcsDestination) obj; - - if (!getOutputUriPrefix().equals(other.getOutputUriPrefix())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + OUTPUT_URI_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getOutputUriPrefix().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The Google Cloud Storage location where the output is to be written to.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GcsDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GcsDestination) - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GcsDestination.class, - com.google.cloud.automl.v1beta1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - outputUriPrefix_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsDestination build() { - com.google.cloud.automl.v1beta1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsDestination buildPartial() { - com.google.cloud.automl.v1beta1.GcsDestination result = - new com.google.cloud.automl.v1beta1.GcsDestination(this); - result.outputUriPrefix_ = outputUriPrefix_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GcsDestination) { - return mergeFrom((com.google.cloud.automl.v1beta1.GcsDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GcsDestination other) { - if (other == com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance()) return this; - if (!other.getOutputUriPrefix().isEmpty()) { - outputUriPrefix_ = other.outputUriPrefix_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object outputUriPrefix_ = ""; - /** - * - * - *
-     * Required. Google Cloud Storage URI to output directory, up to 2000
-     * characters long.
-     * Accepted forms:
-     * * Prefix path: gs://bucket/directory
-     * The requesting user must have write permission to the bucket.
-     * The directory is created if it doesn't exist.
-     * 
- * - * string output_uri_prefix = 1; - * - * @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, up to 2000
-     * characters long.
-     * Accepted forms:
-     * * Prefix path: gs://bucket/directory
-     * The requesting user must have write permission to the bucket.
-     * The directory is created if it doesn't exist.
-     * 
- * - * string output_uri_prefix = 1; - * - * @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, up to 2000
-     * characters long.
-     * Accepted forms:
-     * * Prefix path: gs://bucket/directory
-     * The requesting user must have write permission to the bucket.
-     * The directory is created if it doesn't exist.
-     * 
- * - * string output_uri_prefix = 1; - * - * @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, up to 2000
-     * characters long.
-     * Accepted forms:
-     * * Prefix path: gs://bucket/directory
-     * The requesting user must have write permission to the bucket.
-     * The directory is created if it doesn't exist.
-     * 
- * - * string output_uri_prefix = 1; - * - * @return This builder for chaining. - */ - public Builder clearOutputUriPrefix() { - - outputUriPrefix_ = getDefaultInstance().getOutputUriPrefix(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Google Cloud Storage URI to output directory, up to 2000
-     * characters long.
-     * Accepted forms:
-     * * Prefix path: gs://bucket/directory
-     * The requesting user must have write permission to the bucket.
-     * The directory is created if it doesn't exist.
-     * 
- * - * string output_uri_prefix = 1; - * - * @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.automl.v1beta1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GcsDestination) - private static final com.google.cloud.automl.v1beta1.GcsDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GcsDestination(); - } - - public static com.google.cloud.automl.v1beta1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestinationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestinationOrBuilder.java deleted file mode 100644 index 694f7419c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface GcsDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory, up to 2000
-   * characters long.
-   * Accepted forms:
-   * * Prefix path: gs://bucket/directory
-   * The requesting user must have write permission to the bucket.
-   * The directory is created if it doesn't exist.
-   * 
- * - * string output_uri_prefix = 1; - * - * @return The outputUriPrefix. - */ - java.lang.String getOutputUriPrefix(); - /** - * - * - *
-   * Required. Google Cloud Storage URI to output directory, up to 2000
-   * characters long.
-   * Accepted forms:
-   * * Prefix path: gs://bucket/directory
-   * The requesting user must have write permission to the bucket.
-   * The directory is created if it doesn't exist.
-   * 
- * - * string output_uri_prefix = 1; - * - * @return The bytes for outputUriPrefix. - */ - com.google.protobuf.ByteString getOutputUriPrefixBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSource.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSource.java deleted file mode 100644 index 84f097c47..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSource.java +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The Google Cloud Storage location for the input content.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GcsSource} - */ -public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.GcsSource) - GcsSourceOrBuilder { - private static final long serialVersionUID = 0L; - // Use GcsSource.newBuilder() to construct. - private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GcsSource() { - inputUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @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)) { - inputUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inputUris_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inputUris_ = inputUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GcsSource.class, - com.google.cloud.automl.v1beta1.GcsSource.Builder.class); - } - - public static final int INPUT_URIS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList inputUris_; - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @return A list containing the inputUris. - */ - public com.google.protobuf.ProtocolStringList getInputUrisList() { - return inputUris_; - } - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @return The count of inputUris. - */ - public int getInputUrisCount() { - return inputUris_.size(); - } - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @param index The index of the element to return. - * @return The inputUris at the given index. - */ - public java.lang.String getInputUris(int index) { - return inputUris_.get(index); - } - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @param index The index of the value to return. - * @return The bytes of the inputUris at the given index. - */ - public com.google.protobuf.ByteString getInputUrisBytes(int index) { - return inputUris_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < inputUris_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputUris_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - for (int i = 0; i < inputUris_.size(); i++) { - dataSize += computeStringSizeNoTag(inputUris_.getRaw(i)); - } - size += dataSize; - size += 1 * getInputUrisList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GcsSource)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GcsSource other = - (com.google.cloud.automl.v1beta1.GcsSource) obj; - - if (!getInputUrisList().equals(other.getInputUrisList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getInputUrisCount() > 0) { - hash = (37 * hash) + INPUT_URIS_FIELD_NUMBER; - hash = (53 * hash) + getInputUrisList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.GcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GcsSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GcsSource) - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GcsSource.class, - com.google.cloud.automl.v1beta1.GcsSource.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - inputUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_GcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsSource getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsSource build() { - com.google.cloud.automl.v1beta1.GcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsSource buildPartial() { - com.google.cloud.automl.v1beta1.GcsSource result = - new com.google.cloud.automl.v1beta1.GcsSource(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - inputUris_ = inputUris_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.inputUris_ = inputUris_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GcsSource) { - return mergeFrom((com.google.cloud.automl.v1beta1.GcsSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GcsSource other) { - if (other == com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance()) return this; - if (!other.inputUris_.isEmpty()) { - if (inputUris_.isEmpty()) { - inputUris_ = other.inputUris_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInputUrisIsMutable(); - inputUris_.addAll(other.inputUris_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.GcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList inputUris_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureInputUrisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - inputUris_ = new com.google.protobuf.LazyStringArrayList(inputUris_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @return A list containing the inputUris. - */ - public com.google.protobuf.ProtocolStringList getInputUrisList() { - return inputUris_.getUnmodifiableView(); - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @return The count of inputUris. - */ - public int getInputUrisCount() { - return inputUris_.size(); - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @param index The index of the element to return. - * @return The inputUris at the given index. - */ - public java.lang.String getInputUris(int index) { - return inputUris_.get(index); - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @param index The index of the value to return. - * @return The bytes of the inputUris at the given index. - */ - public com.google.protobuf.ByteString getInputUrisBytes(int index) { - return inputUris_.getByteString(index); - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @param index The index to set the value at. - * @param value The inputUris to set. - * @return This builder for chaining. - */ - public Builder setInputUris(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputUrisIsMutable(); - inputUris_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @param value The inputUris to add. - * @return This builder for chaining. - */ - public Builder addInputUris(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputUrisIsMutable(); - inputUris_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @param values The inputUris to add. - * @return This builder for chaining. - */ - public Builder addAllInputUris(java.lang.Iterable values) { - ensureInputUrisIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputUris_); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @return This builder for chaining. - */ - public Builder clearInputUris() { - inputUris_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-     * long. Accepted forms:
-     * * Full object path, e.g. gs://bucket/directory/object.csv
-     * 
- * - * repeated string input_uris = 1; - * - * @param value The bytes of the inputUris to add. - * @return This builder for chaining. - */ - public Builder addInputUrisBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureInputUrisIsMutable(); - inputUris_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.GcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GcsSource) - private static final com.google.cloud.automl.v1beta1.GcsSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GcsSource(); - } - - public static com.google.cloud.automl.v1beta1.GcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSourceOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSourceOrBuilder.java deleted file mode 100644 index bb6073fd0..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GcsSourceOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface GcsSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @return A list containing the inputUris. - */ - java.util.List getInputUrisList(); - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @return The count of inputUris. - */ - int getInputUrisCount(); - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @param index The index of the element to return. - * @return The inputUris at the given index. - */ - java.lang.String getInputUris(int index); - /** - * - * - *
-   * Required. Google Cloud Storage URIs to input files, up to 2000 characters
-   * long. Accepted forms:
-   * * Full object path, e.g. gs://bucket/directory/object.csv
-   * 
- * - * repeated string input_uris = 1; - * - * @param index The index of the value to return. - * @return The bytes of the inputUris at the given index. - */ - com.google.protobuf.ByteString getInputUrisBytes(int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Geometry.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Geometry.java deleted file mode 100644 index e85401c2e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Geometry.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/geometry.proto - -package com.google.cloud.automl.v1beta1; - -public final class Geometry { - private Geometry() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_NormalizedVertex_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_NormalizedVertex_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BoundingPoly_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BoundingPoly_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n*google/cloud/automl/v1beta1/geometry.p" - + "roto\022\033google.cloud.automl.v1beta1\032\034googl" - + "e/api/annotations.proto\"(\n\020NormalizedVer" - + "tex\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\"Z\n\014BoundingPol" - + "y\022J\n\023normalized_vertices\030\002 \003(\0132-.google." - + "cloud.automl.v1beta1.NormalizedVertexB\245\001" - + "\n\037com.google.cloud.automl.v1beta1P\001ZAgoo" - + "gle.golang.org/genproto/googleapis/cloud" - + "/automl/v1beta1;automl\312\002\033Google\\Cloud\\Au" - + "toMl\\V1beta1\352\002\036Google::Cloud::AutoML::V1" - + "beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_NormalizedVertex_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_NormalizedVertex_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_NormalizedVertex_descriptor, - new java.lang.String[] { - "X", "Y", - }); - internal_static_google_cloud_automl_v1beta1_BoundingPoly_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_BoundingPoly_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BoundingPoly_descriptor, - new java.lang.String[] { - "NormalizedVertices", - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequest.java deleted file mode 100644 index c79c44e7e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequest.java +++ /dev/null @@ -1,649 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetAnnotationSpecRequest} - */ -public final class GetAnnotationSpecRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest.class, - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the annotation spec to retrieve.
-   * 
- * - * - * 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) { - 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 annotation spec to retrieve.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest other = - (com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.GetAnnotationSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.GetAnnotationSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.GetAnnotationSpecRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.GetAnnotationSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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 [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetAnnotationSpecRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GetAnnotationSpecRequest) - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest.class, - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetAnnotationSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest build() { - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest buildPartial() { - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest result = - new com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest other) { - if (other == com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the annotation spec to retrieve.
-     * 
- * - * - * 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 annotation spec to retrieve.
-     * 
- * - * - * 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 annotation spec to retrieve.
-     * 
- * - * - * 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 annotation spec to retrieve.
-     * 
- * - * - * 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 annotation spec to retrieve.
-     * 
- * - * - * 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.automl.v1beta1.GetAnnotationSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GetAnnotationSpecRequest) - private static final com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GetAnnotationSpecRequest(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.GetAnnotationSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequestOrBuilder.java deleted file mode 100644 index 580d815e0..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetAnnotationSpecRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface GetAnnotationSpecRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GetAnnotationSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the annotation spec to retrieve.
-   * 
- * - * - * 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 annotation spec to retrieve.
-   * 
- * - * - * 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequest.java deleted file mode 100644 index 26b17b047..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequest.java +++ /dev/null @@ -1,913 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetColumnSpecRequest} - */ -public final class GetColumnSpecRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.GetColumnSpecRequest) - GetColumnSpecRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetColumnSpecRequest.newBuilder() to construct. - private GetColumnSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetColumnSpecRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetColumnSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetColumnSpecRequest( - 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 (fieldMask_ != null) { - subBuilder = fieldMask_.toBuilder(); - } - fieldMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fieldMask_); - fieldMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetColumnSpecRequest.class, - com.google.cloud.automl.v1beta1.GetColumnSpecRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the column spec to retrieve.
-   * 
- * - * - * 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) { - 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 column spec to retrieve.
-   * 
- * - * - * 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 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 FIELD_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask fieldMask_; - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMask_ != null; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - return getFieldMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (fieldMask_ != null) { - output.writeMessage(2, getFieldMask()); - } - 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 (fieldMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GetColumnSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GetColumnSpecRequest other = - (com.google.cloud.automl.v1beta1.GetColumnSpecRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (hasFieldMask() != other.hasFieldMask()) return false; - if (hasFieldMask()) { - if (!getFieldMask().equals(other.getFieldMask())) return false; - } - if (!unknownFields.equals(other.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 (hasFieldMask()) { - hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; - hash = (53 * hash) + getFieldMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.GetColumnSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetColumnSpecRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GetColumnSpecRequest) - com.google.cloud.automl.v1beta1.GetColumnSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetColumnSpecRequest.class, - com.google.cloud.automl.v1beta1.GetColumnSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GetColumnSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (fieldMaskBuilder_ == null) { - fieldMask_ = null; - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetColumnSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetColumnSpecRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GetColumnSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetColumnSpecRequest build() { - com.google.cloud.automl.v1beta1.GetColumnSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetColumnSpecRequest buildPartial() { - com.google.cloud.automl.v1beta1.GetColumnSpecRequest result = - new com.google.cloud.automl.v1beta1.GetColumnSpecRequest(this); - result.name_ = name_; - if (fieldMaskBuilder_ == null) { - result.fieldMask_ = fieldMask_; - } else { - result.fieldMask_ = fieldMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GetColumnSpecRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.GetColumnSpecRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GetColumnSpecRequest other) { - if (other == com.google.cloud.automl.v1beta1.GetColumnSpecRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasFieldMask()) { - mergeFieldMask(other.getFieldMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GetColumnSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.GetColumnSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the column spec to retrieve.
-     * 
- * - * - * 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 column spec to retrieve.
-     * 
- * - * - * 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 column spec to retrieve.
-     * 
- * - * - * 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 column spec to retrieve.
-     * 
- * - * - * 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 column spec to retrieve.
-     * 
- * - * - * 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 fieldMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - fieldMaskBuilder_; - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMaskBuilder_ != null || fieldMask_ != null; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - if (fieldMaskBuilder_ == null) { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } else { - return fieldMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldMask_ = value; - onChanged(); - } else { - fieldMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (fieldMaskBuilder_ == null) { - fieldMask_ = builderForValue.build(); - onChanged(); - } else { - fieldMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (fieldMask_ != null) { - fieldMask_ = - com.google.protobuf.FieldMask.newBuilder(fieldMask_).mergeFrom(value).buildPartial(); - } else { - fieldMask_ = value; - } - onChanged(); - } else { - fieldMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder clearFieldMask() { - if (fieldMaskBuilder_ == null) { - fieldMask_ = null; - onChanged(); - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { - - onChanged(); - return getFieldMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - if (fieldMaskBuilder_ != null) { - return fieldMaskBuilder_.getMessageOrBuilder(); - } else { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getFieldMaskFieldBuilder() { - if (fieldMaskBuilder_ == null) { - fieldMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getFieldMask(), getParentForChildren(), isClean()); - fieldMask_ = null; - } - return fieldMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.GetColumnSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GetColumnSpecRequest) - private static final com.google.cloud.automl.v1beta1.GetColumnSpecRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GetColumnSpecRequest(); - } - - public static com.google.cloud.automl.v1beta1.GetColumnSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetColumnSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetColumnSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetColumnSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequestOrBuilder.java deleted file mode 100644 index 69ed101ba..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetColumnSpecRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface GetColumnSpecRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GetColumnSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the column spec to retrieve.
-   * 
- * - * - * 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 column spec to retrieve.
-   * 
- * - * - * 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 field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - boolean hasFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - com.google.protobuf.FieldMask getFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequest.java deleted file mode 100644 index 6b7211808..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequest.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetDatasetRequest} - */ -public final class GetDatasetRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetDatasetRequest.class, - com.google.cloud.automl.v1beta1.GetDatasetRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the dataset to retrieve.
-   * 
- * - * - * 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) { - 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 retrieve.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GetDatasetRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GetDatasetRequest other = - (com.google.cloud.automl.v1beta1.GetDatasetRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.GetDatasetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetDatasetRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GetDatasetRequest) - com.google.cloud.automl.v1beta1.GetDatasetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetDatasetRequest.class, - com.google.cloud.automl.v1beta1.GetDatasetRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GetDatasetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetDatasetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetDatasetRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GetDatasetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetDatasetRequest build() { - com.google.cloud.automl.v1beta1.GetDatasetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetDatasetRequest buildPartial() { - com.google.cloud.automl.v1beta1.GetDatasetRequest result = - new com.google.cloud.automl.v1beta1.GetDatasetRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GetDatasetRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.GetDatasetRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GetDatasetRequest other) { - if (other == com.google.cloud.automl.v1beta1.GetDatasetRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GetDatasetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.GetDatasetRequest) 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 retrieve.
-     * 
- * - * - * 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 retrieve.
-     * 
- * - * - * 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 retrieve.
-     * 
- * - * - * 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 retrieve.
-     * 
- * - * - * 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 retrieve.
-     * 
- * - * - * 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.automl.v1beta1.GetDatasetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GetDatasetRequest) - private static final com.google.cloud.automl.v1beta1.GetDatasetRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GetDatasetRequest(); - } - - public static com.google.cloud.automl.v1beta1.GetDatasetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetDatasetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDatasetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetDatasetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequestOrBuilder.java deleted file mode 100644 index 01ff1b52c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetDatasetRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface GetDatasetRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GetDatasetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the dataset to retrieve.
-   * 
- * - * - * 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 retrieve.
-   * 
- * - * - * 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequest.java deleted file mode 100644 index b385dac79..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequest.java +++ /dev/null @@ -1,649 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetModelEvaluationRequest} - */ -public final class GetModelEvaluationRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.class, - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Resource name for the model 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) { - 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. Resource name for the model 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GetModelEvaluationRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest other = - (com.google.cloud.automl.v1beta1.GetModelEvaluationRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetModelEvaluationRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GetModelEvaluationRequest) - com.google.cloud.automl.v1beta1.GetModelEvaluationRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.class, - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelEvaluationRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelEvaluationRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelEvaluationRequest build() { - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelEvaluationRequest buildPartial() { - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest result = - new com.google.cloud.automl.v1beta1.GetModelEvaluationRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GetModelEvaluationRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.GetModelEvaluationRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GetModelEvaluationRequest other) { - if (other == com.google.cloud.automl.v1beta1.GetModelEvaluationRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GetModelEvaluationRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.GetModelEvaluationRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Resource name for the model 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. Resource name for the model 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. Resource name for the model 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. Resource name for the model 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. Resource name for the model 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.automl.v1beta1.GetModelEvaluationRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GetModelEvaluationRequest) - private static final com.google.cloud.automl.v1beta1.GetModelEvaluationRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GetModelEvaluationRequest(); - } - - public static com.google.cloud.automl.v1beta1.GetModelEvaluationRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetModelEvaluationRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetModelEvaluationRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelEvaluationRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequestOrBuilder.java deleted file mode 100644 index 81798b30a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelEvaluationRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface GetModelEvaluationRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GetModelEvaluationRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name for the model evaluation.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Resource name for the model 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequest.java deleted file mode 100644 index 983621061..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequest.java +++ /dev/null @@ -1,647 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetModelRequest} - */ -public final class GetModelRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetModelRequest.class, - com.google.cloud.automl.v1beta1.GetModelRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Resource name of the 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) { - 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. Resource name of the 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GetModelRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GetModelRequest other = - (com.google.cloud.automl.v1beta1.GetModelRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.GetModelRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GetModelRequest) - com.google.cloud.automl.v1beta1.GetModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetModelRequest.class, - com.google.cloud.automl.v1beta1.GetModelRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GetModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GetModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelRequest build() { - com.google.cloud.automl.v1beta1.GetModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelRequest buildPartial() { - com.google.cloud.automl.v1beta1.GetModelRequest result = - new com.google.cloud.automl.v1beta1.GetModelRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GetModelRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.GetModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GetModelRequest other) { - if (other == com.google.cloud.automl.v1beta1.GetModelRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GetModelRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.GetModelRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Resource name of the 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. Resource name of the 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. Resource name of the 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. Resource name of the 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. Resource name of the 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.automl.v1beta1.GetModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GetModelRequest) - private static final com.google.cloud.automl.v1beta1.GetModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GetModelRequest(); - } - - public static com.google.cloud.automl.v1beta1.GetModelRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetModelRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetModelRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequestOrBuilder.java deleted file mode 100644 index 92e67a6df..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetModelRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface GetModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GetModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of the model.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Resource name of the 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequest.java deleted file mode 100644 index 59dfc01e6..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequest.java +++ /dev/null @@ -1,913 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetTableSpecRequest} - */ -public final class GetTableSpecRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.GetTableSpecRequest) - GetTableSpecRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetTableSpecRequest.newBuilder() to construct. - private GetTableSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetTableSpecRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetTableSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GetTableSpecRequest( - 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 (fieldMask_ != null) { - subBuilder = fieldMask_.toBuilder(); - } - fieldMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fieldMask_); - fieldMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetTableSpecRequest.class, - com.google.cloud.automl.v1beta1.GetTableSpecRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the table spec to retrieve.
-   * 
- * - * - * 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) { - 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 table spec to retrieve.
-   * 
- * - * - * 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 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 FIELD_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask fieldMask_; - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMask_ != null; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - return getFieldMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (fieldMask_ != null) { - output.writeMessage(2, getFieldMask()); - } - 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 (fieldMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.GetTableSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.GetTableSpecRequest other = - (com.google.cloud.automl.v1beta1.GetTableSpecRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (hasFieldMask() != other.hasFieldMask()) return false; - if (hasFieldMask()) { - if (!getFieldMask().equals(other.getFieldMask())) return false; - } - if (!unknownFields.equals(other.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 (hasFieldMask()) { - hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; - hash = (53 * hash) + getFieldMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.GetTableSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.GetTableSpecRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.GetTableSpecRequest) - com.google.cloud.automl.v1beta1.GetTableSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.GetTableSpecRequest.class, - com.google.cloud.automl.v1beta1.GetTableSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.GetTableSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (fieldMaskBuilder_ == null) { - fieldMask_ = null; - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_GetTableSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetTableSpecRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.GetTableSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetTableSpecRequest build() { - com.google.cloud.automl.v1beta1.GetTableSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetTableSpecRequest buildPartial() { - com.google.cloud.automl.v1beta1.GetTableSpecRequest result = - new com.google.cloud.automl.v1beta1.GetTableSpecRequest(this); - result.name_ = name_; - if (fieldMaskBuilder_ == null) { - result.fieldMask_ = fieldMask_; - } else { - result.fieldMask_ = fieldMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.GetTableSpecRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.GetTableSpecRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.GetTableSpecRequest other) { - if (other == com.google.cloud.automl.v1beta1.GetTableSpecRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasFieldMask()) { - mergeFieldMask(other.getFieldMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.GetTableSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.GetTableSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the table spec to retrieve.
-     * 
- * - * - * 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 table spec to retrieve.
-     * 
- * - * - * 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 table spec to retrieve.
-     * 
- * - * - * 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 table spec to retrieve.
-     * 
- * - * - * 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 table spec to retrieve.
-     * 
- * - * - * 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 fieldMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - fieldMaskBuilder_; - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMaskBuilder_ != null || fieldMask_ != null; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - if (fieldMaskBuilder_ == null) { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } else { - return fieldMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldMask_ = value; - onChanged(); - } else { - fieldMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (fieldMaskBuilder_ == null) { - fieldMask_ = builderForValue.build(); - onChanged(); - } else { - fieldMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (fieldMask_ != null) { - fieldMask_ = - com.google.protobuf.FieldMask.newBuilder(fieldMask_).mergeFrom(value).buildPartial(); - } else { - fieldMask_ = value; - } - onChanged(); - } else { - fieldMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder clearFieldMask() { - if (fieldMaskBuilder_ == null) { - fieldMask_ = null; - onChanged(); - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { - - onChanged(); - return getFieldMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - if (fieldMaskBuilder_ != null) { - return fieldMaskBuilder_.getMessageOrBuilder(); - } else { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getFieldMaskFieldBuilder() { - if (fieldMaskBuilder_ == null) { - fieldMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getFieldMask(), getParentForChildren(), isClean()); - fieldMask_ = null; - } - return fieldMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.GetTableSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.GetTableSpecRequest) - private static final com.google.cloud.automl.v1beta1.GetTableSpecRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.GetTableSpecRequest(); - } - - public static com.google.cloud.automl.v1beta1.GetTableSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetTableSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTableSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.GetTableSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequestOrBuilder.java deleted file mode 100644 index 602d954d1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/GetTableSpecRequestOrBuilder.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface GetTableSpecRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.GetTableSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the table spec to retrieve.
-   * 
- * - * - * 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 table spec to retrieve.
-   * 
- * - * - * 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 field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - boolean hasFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - com.google.protobuf.FieldMask getFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Image.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Image.java deleted file mode 100644 index 58dde6e3f..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Image.java +++ /dev/null @@ -1,1122 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A representation of an image.
- * Only images up to 30MB in size are supported.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Image} - */ -public final class Image extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Image) - ImageOrBuilder { - private static final long serialVersionUID = 0L; - // Use Image.newBuilder() to construct. - private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Image() { - thumbnailUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Image(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Image( - 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: - { - dataCase_ = 1; - data_ = input.readBytes(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - thumbnailUri_ = s; - break; - } - case 50: - { - com.google.cloud.automl.v1beta1.InputConfig.Builder subBuilder = null; - if (dataCase_ == 6) { - subBuilder = ((com.google.cloud.automl.v1beta1.InputConfig) data_).toBuilder(); - } - data_ = - input.readMessage( - com.google.cloud.automl.v1beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.InputConfig) data_); - data_ = subBuilder.buildPartial(); - } - dataCase_ = 6; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Image.class, - com.google.cloud.automl.v1beta1.Image.Builder.class); - } - - private int dataCase_ = 0; - private java.lang.Object data_; - - public enum DataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - IMAGE_BYTES(1), - INPUT_CONFIG(6), - DATA_NOT_SET(0); - private final int value; - - private DataCase(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 DataCase valueOf(int value) { - return forNumber(value); - } - - public static DataCase forNumber(int value) { - switch (value) { - case 1: - return IMAGE_BYTES; - case 6: - return INPUT_CONFIG; - case 0: - return DATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DataCase getDataCase() { - return DataCase.forNumber(dataCase_); - } - - public static final int IMAGE_BYTES_FIELD_NUMBER = 1; - /** - * - * - *
-   * Image content represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes image_bytes = 1; - * - * @return The imageBytes. - */ - public com.google.protobuf.ByteString getImageBytes() { - if (dataCase_ == 1) { - return (com.google.protobuf.ByteString) data_; - } - return com.google.protobuf.ByteString.EMPTY; - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 6; - /** - * - * - *
-   * An input config specifying the content of the image.
-   * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return dataCase_ == 6; - } - /** - * - * - *
-   * An input config specifying the content of the image.
-   * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.InputConfig getInputConfig() { - if (dataCase_ == 6) { - return (com.google.cloud.automl.v1beta1.InputConfig) data_; - } - return com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance(); - } - /** - * - * - *
-   * An input config specifying the content of the image.
-   * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (dataCase_ == 6) { - return (com.google.cloud.automl.v1beta1.InputConfig) data_; - } - return com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance(); - } - - public static final int THUMBNAIL_URI_FIELD_NUMBER = 4; - private volatile java.lang.Object thumbnailUri_; - /** - * - * - *
-   * Output only. HTTP URI to the thumbnail image.
-   * 
- * - * string thumbnail_uri = 4; - * - * @return The thumbnailUri. - */ - public java.lang.String getThumbnailUri() { - java.lang.Object ref = thumbnailUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - thumbnailUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. HTTP URI to the thumbnail image.
-   * 
- * - * string thumbnail_uri = 4; - * - * @return The bytes for thumbnailUri. - */ - public com.google.protobuf.ByteString getThumbnailUriBytes() { - java.lang.Object ref = thumbnailUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - thumbnailUri_ = 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 (dataCase_ == 1) { - output.writeBytes(1, (com.google.protobuf.ByteString) data_); - } - if (!getThumbnailUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, thumbnailUri_); - } - if (dataCase_ == 6) { - output.writeMessage(6, (com.google.cloud.automl.v1beta1.InputConfig) data_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeBytesSize( - 1, (com.google.protobuf.ByteString) data_); - } - if (!getThumbnailUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, thumbnailUri_); - } - if (dataCase_ == 6) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 6, (com.google.cloud.automl.v1beta1.InputConfig) data_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.Image)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Image other = (com.google.cloud.automl.v1beta1.Image) obj; - - if (!getThumbnailUri().equals(other.getThumbnailUri())) return false; - if (!getDataCase().equals(other.getDataCase())) return false; - switch (dataCase_) { - case 1: - if (!getImageBytes().equals(other.getImageBytes())) return false; - break; - case 6: - if (!getInputConfig().equals(other.getInputConfig())) 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) + THUMBNAIL_URI_FIELD_NUMBER; - hash = (53 * hash) + getThumbnailUri().hashCode(); - switch (dataCase_) { - case 1: - hash = (37 * hash) + IMAGE_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getImageBytes().hashCode(); - break; - case 6: - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Image parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Image parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Image parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.Image prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A representation of an image.
-   * Only images up to 30MB in size are supported.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Image} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Image) - com.google.cloud.automl.v1beta1.ImageOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Image_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Image_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Image.class, - com.google.cloud.automl.v1beta1.Image.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - thumbnailUri_ = ""; - - dataCase_ = 0; - data_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Image_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Image getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Image.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Image build() { - com.google.cloud.automl.v1beta1.Image result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Image buildPartial() { - com.google.cloud.automl.v1beta1.Image result = - new com.google.cloud.automl.v1beta1.Image(this); - if (dataCase_ == 1) { - result.data_ = data_; - } - if (dataCase_ == 6) { - if (inputConfigBuilder_ == null) { - result.data_ = data_; - } else { - result.data_ = inputConfigBuilder_.build(); - } - } - result.thumbnailUri_ = thumbnailUri_; - result.dataCase_ = dataCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Image) { - return mergeFrom((com.google.cloud.automl.v1beta1.Image) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Image other) { - if (other == com.google.cloud.automl.v1beta1.Image.getDefaultInstance()) return this; - if (!other.getThumbnailUri().isEmpty()) { - thumbnailUri_ = other.thumbnailUri_; - onChanged(); - } - switch (other.getDataCase()) { - case IMAGE_BYTES: - { - setImageBytes(other.getImageBytes()); - break; - } - case INPUT_CONFIG: - { - mergeInputConfig(other.getInputConfig()); - break; - } - case DATA_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Image parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.Image) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int dataCase_ = 0; - private java.lang.Object data_; - - public DataCase getDataCase() { - return DataCase.forNumber(dataCase_); - } - - public Builder clearData() { - dataCase_ = 0; - data_ = null; - onChanged(); - return this; - } - - /** - * - * - *
-     * Image content represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes image_bytes = 1; - * - * @return The imageBytes. - */ - public com.google.protobuf.ByteString getImageBytes() { - if (dataCase_ == 1) { - return (com.google.protobuf.ByteString) data_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * - * - *
-     * Image content represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes image_bytes = 1; - * - * @param value The imageBytes to set. - * @return This builder for chaining. - */ - public Builder setImageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - dataCase_ = 1; - data_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Image content represented as a stream of bytes.
-     * Note: As with all `bytes` fields, protobuffers use a pure binary
-     * representation, whereas JSON representations use base64.
-     * 
- * - * bytes image_bytes = 1; - * - * @return This builder for chaining. - */ - public Builder clearImageBytes() { - if (dataCase_ == 1) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder> - inputConfigBuilder_; - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return dataCase_ == 6; - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - if (dataCase_ == 6) { - return (com.google.cloud.automl.v1beta1.InputConfig) data_; - } - return com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance(); - } else { - if (dataCase_ == 6) { - return inputConfigBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - public Builder setInputConfig(com.google.cloud.automl.v1beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - dataCase_ = 6; - return this; - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - public Builder setInputConfig( - com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - data_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - dataCase_ = 6; - return this; - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - public Builder mergeInputConfig(com.google.cloud.automl.v1beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (dataCase_ == 6 - && data_ != com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance()) { - data_ = - com.google.cloud.automl.v1beta1.InputConfig.newBuilder( - (com.google.cloud.automl.v1beta1.InputConfig) data_) - .mergeFrom(value) - .buildPartial(); - } else { - data_ = value; - } - onChanged(); - } else { - if (dataCase_ == 6) { - inputConfigBuilder_.mergeFrom(value); - } - inputConfigBuilder_.setMessage(value); - } - dataCase_ = 6; - return this; - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - if (dataCase_ == 6) { - dataCase_ = 0; - data_ = null; - onChanged(); - } - } else { - if (dataCase_ == 6) { - dataCase_ = 0; - data_ = null; - } - inputConfigBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - public com.google.cloud.automl.v1beta1.InputConfig.Builder getInputConfigBuilder() { - return getInputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if ((dataCase_ == 6) && (inputConfigBuilder_ != null)) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - if (dataCase_ == 6) { - return (com.google.cloud.automl.v1beta1.InputConfig) data_; - } - return com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance(); - } - } - /** - * - * - *
-     * An input config specifying the content of the image.
-     * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - if (!(dataCase_ == 6)) { - data_ = com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance(); - } - inputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder>( - (com.google.cloud.automl.v1beta1.InputConfig) data_, - getParentForChildren(), - isClean()); - data_ = null; - } - dataCase_ = 6; - onChanged(); - ; - return inputConfigBuilder_; - } - - private java.lang.Object thumbnailUri_ = ""; - /** - * - * - *
-     * Output only. HTTP URI to the thumbnail image.
-     * 
- * - * string thumbnail_uri = 4; - * - * @return The thumbnailUri. - */ - public java.lang.String getThumbnailUri() { - java.lang.Object ref = thumbnailUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - thumbnailUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. HTTP URI to the thumbnail image.
-     * 
- * - * string thumbnail_uri = 4; - * - * @return The bytes for thumbnailUri. - */ - public com.google.protobuf.ByteString getThumbnailUriBytes() { - java.lang.Object ref = thumbnailUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - thumbnailUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. HTTP URI to the thumbnail image.
-     * 
- * - * string thumbnail_uri = 4; - * - * @param value The thumbnailUri to set. - * @return This builder for chaining. - */ - public Builder setThumbnailUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - thumbnailUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. HTTP URI to the thumbnail image.
-     * 
- * - * string thumbnail_uri = 4; - * - * @return This builder for chaining. - */ - public Builder clearThumbnailUri() { - - thumbnailUri_ = getDefaultInstance().getThumbnailUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. HTTP URI to the thumbnail image.
-     * 
- * - * string thumbnail_uri = 4; - * - * @param value The bytes for thumbnailUri to set. - * @return This builder for chaining. - */ - public Builder setThumbnailUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - thumbnailUri_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Image) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Image) - private static final com.google.cloud.automl.v1beta1.Image DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Image(); - } - - public static com.google.cloud.automl.v1beta1.Image getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Image parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Image getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadata.java deleted file mode 100644 index 9aaa8df24..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadata.java +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata that is specific to image classification.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} - */ -public final class ImageClassificationDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - ImageClassificationDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageClassificationDatasetMetadata.newBuilder() to construct. - private ImageClassificationDatasetMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageClassificationDatasetMetadata() { - classificationType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageClassificationDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageClassificationDatasetMetadata( - 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(); - - classificationType_ = 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.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder.class); - } - - public static final int CLASSIFICATION_TYPE_FIELD_NUMBER = 1; - private int classificationType_; - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The enum numeric value on the wire for classificationType. - */ - public int getClassificationTypeValue() { - return classificationType_; - } - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The classificationType. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - getClassificationType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType result = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.valueOf( - classificationType_); - return result == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.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 (classificationType_ - != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - .CLASSIFICATION_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, classificationType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (classificationType_ - != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - .CLASSIFICATION_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, classificationType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata other = - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) obj; - - if (classificationType_ != other.classificationType_) return false; - if (!unknownFields.equals(other.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) + CLASSIFICATION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + classificationType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata that is specific to image classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - classificationType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata build() { - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata result = - new com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata(this); - result.classificationType_ = classificationType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - .getDefaultInstance()) return this; - if (other.classificationType_ != 0) { - setClassificationTypeValue(other.getClassificationTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int classificationType_ = 0; - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The enum numeric value on the wire for classificationType. - */ - public int getClassificationTypeValue() { - return classificationType_; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @param value The enum numeric value on the wire for classificationType to set. - * @return This builder for chaining. - */ - public Builder setClassificationTypeValue(int value) { - classificationType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The classificationType. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - getClassificationType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType result = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.valueOf( - classificationType_); - return result == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @param value The classificationType to set. - * @return This builder for chaining. - */ - public Builder setClassificationType( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType value) { - if (value == null) { - throw new NullPointerException(); - } - - classificationType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return This builder for chaining. - */ - public Builder clearClassificationType() { - - classificationType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageClassificationDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageClassificationDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadataOrBuilder.java deleted file mode 100644 index b7c177d77..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageClassificationDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The enum numeric value on the wire for classificationType. - */ - int getClassificationTypeValue(); - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The classificationType. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType getClassificationType(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadata.java deleted file mode 100644 index 8c79e9c1a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadata.java +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model deployment metadata specific to Image Classification.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} - */ -public final class ImageClassificationModelDeploymentMetadata - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - ImageClassificationModelDeploymentMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageClassificationModelDeploymentMetadata.newBuilder() to construct. - private ImageClassificationModelDeploymentMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageClassificationModelDeploymentMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageClassificationModelDeploymentMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageClassificationModelDeploymentMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - nodeCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.class, - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder - .class); - } - - public static final int NODE_COUNT_FIELD_NUMBER = 1; - private long nodeCount_; - /** - * - * - *
-   * Input only. The number of nodes to deploy the model on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the model's
-   * [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps].
-   * Must be between 1 and 100, inclusive on both ends.
-   * 
- * - * int64 node_count = 1; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (nodeCount_ != 0L) { - output.writeInt64(1, nodeCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (nodeCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, nodeCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata other = - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) obj; - - if (getNodeCount() != other.getNodeCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNodeCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Model deployment metadata specific to Image Classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.class, - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.Builder - .class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - nodeCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata build() { - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - buildPartial() { - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata result = - new com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata(this); - result.nodeCount_ = nodeCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - .getDefaultInstance()) return this; - if (other.getNodeCount() != 0L) { - setNodeCount(other.getNodeCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long nodeCount_; - /** - * - * - *
-     * Input only. The number of nodes to deploy the model on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the model's
-     * [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps].
-     * Must be between 1 and 100, inclusive on both ends.
-     * 
- * - * int64 node_count = 1; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - /** - * - * - *
-     * Input only. The number of nodes to deploy the model on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the model's
-     * [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps].
-     * Must be between 1 and 100, inclusive on both ends.
-     * 
- * - * int64 node_count = 1; - * - * @param value The nodeCount to set. - * @return This builder for chaining. - */ - public Builder setNodeCount(long value) { - - nodeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Input only. The number of nodes to deploy the model on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the model's
-     * [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps].
-     * Must be between 1 and 100, inclusive on both ends.
-     * 
- * - * int64 node_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearNodeCount() { - - nodeCount_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - private static final com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata(); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageClassificationModelDeploymentMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageClassificationModelDeploymentMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadataOrBuilder.java deleted file mode 100644 index f40580896..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelDeploymentMetadataOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageClassificationModelDeploymentMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageClassificationModelDeploymentMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Input only. The number of nodes to deploy the model on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the model's
-   * [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps].
-   * Must be between 1 and 100, inclusive on both ends.
-   * 
- * - * int64 node_count = 1; - * - * @return The nodeCount. - */ - long getNodeCount(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadata.java deleted file mode 100644 index df7cebd9d..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadata.java +++ /dev/null @@ -1,1636 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata for image classification.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationModelMetadata} - */ -public final class ImageClassificationModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - ImageClassificationModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageClassificationModelMetadata.newBuilder() to construct. - private ImageClassificationModelMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageClassificationModelMetadata() { - baseModelId_ = ""; - stopReason_ = ""; - modelType_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageClassificationModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageClassificationModelMetadata( - 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(); - - baseModelId_ = s; - break; - } - case 16: - { - trainBudget_ = input.readInt64(); - break; - } - case 24: - { - trainCost_ = input.readInt64(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - stopReason_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - modelType_ = s; - break; - } - case 105: - { - nodeQps_ = input.readDouble(); - break; - } - case 112: - { - nodeCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.class, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder.class); - } - - public static final int BASE_MODEL_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object baseModelId_; - /** - * - * - *
-   * Optional. The ID of the `base` model. If it is specified, the new model
-   * will be created based on the `base` model. Otherwise, the new model will be
-   * created from scratch. The `base` model must be in the same
-   * `project` and `location` as the new model to create, and have the same
-   * `model_type`.
-   * 
- * - * string base_model_id = 1; - * - * @return The baseModelId. - */ - 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; - } - } - /** - * - * - *
-   * Optional. The ID of the `base` model. If it is specified, the new model
-   * will be created based on the `base` model. Otherwise, the new model will be
-   * created from scratch. The `base` model must be in the same
-   * `project` and `location` as the new model to create, and have the same
-   * `model_type`.
-   * 
- * - * string base_model_id = 1; - * - * @return The bytes for baseModelId. - */ - 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 TRAIN_BUDGET_FIELD_NUMBER = 2; - private long trainBudget_; - /** - * - * - *
-   * Required. The train budget of creating this model, expressed in hours. The
-   * actual `train_cost` will be equal or less than this value.
-   * 
- * - * int64 train_budget = 2; - * - * @return The trainBudget. - */ - public long getTrainBudget() { - return trainBudget_; - } - - public static final int TRAIN_COST_FIELD_NUMBER = 3; - private long trainCost_; - /** - * - * - *
-   * Output only. The actual train cost of creating this model, expressed in
-   * hours. If this model is created from a `base` model, the train cost used
-   * to create the `base` model are not included.
-   * 
- * - * int64 train_cost = 3; - * - * @return The trainCost. - */ - public long getTrainCost() { - return trainCost_; - } - - public static final int STOP_REASON_FIELD_NUMBER = 5; - private volatile java.lang.Object stopReason_; - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The stopReason. - */ - public java.lang.String getStopReason() { - java.lang.Object ref = stopReason_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stopReason_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The bytes for stopReason. - */ - public com.google.protobuf.ByteString getStopReasonBytes() { - java.lang.Object ref = stopReason_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stopReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MODEL_TYPE_FIELD_NUMBER = 7; - private volatile java.lang.Object modelType_; - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud` - Model to be used via prediction calls to AutoML API.
-   *               This is the default value.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards. Expected to have low latency, but may have
-   *               lower prediction quality than other models.
-   * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards.
-   * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-   *               providing prediction via AutoML API, can also be exported
-   *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-   *               Core ML afterwards.  Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * 
- * - * string model_type = 7; - * - * @return The modelType. - */ - public java.lang.String getModelType() { - java.lang.Object ref = modelType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelType_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud` - Model to be used via prediction calls to AutoML API.
-   *               This is the default value.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards. Expected to have low latency, but may have
-   *               lower prediction quality than other models.
-   * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards.
-   * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-   *               providing prediction via AutoML API, can also be exported
-   *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-   *               Core ML afterwards.  Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * 
- * - * string model_type = 7; - * - * @return The bytes for modelType. - */ - public com.google.protobuf.ByteString getModelTypeBytes() { - java.lang.Object ref = modelType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NODE_QPS_FIELD_NUMBER = 13; - private double nodeQps_; - /** - * - * - *
-   * Output only. An approximate number of online prediction QPS that can
-   * be supported by this model per each node on which it is deployed.
-   * 
- * - * double node_qps = 13; - * - * @return The nodeQps. - */ - public double getNodeQps() { - return nodeQps_; - } - - public static final int NODE_COUNT_FIELD_NUMBER = 14; - private long nodeCount_; - /** - * - * - *
-   * Output only. The number of nodes this model is deployed on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the node_qps field.
-   * 
- * - * int64 node_count = 14; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getBaseModelIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, baseModelId_); - } - if (trainBudget_ != 0L) { - output.writeInt64(2, trainBudget_); - } - if (trainCost_ != 0L) { - output.writeInt64(3, trainCost_); - } - if (!getStopReasonBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, stopReason_); - } - if (!getModelTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, modelType_); - } - if (nodeQps_ != 0D) { - output.writeDouble(13, nodeQps_); - } - if (nodeCount_ != 0L) { - output.writeInt64(14, nodeCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getBaseModelIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, baseModelId_); - } - if (trainBudget_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, trainBudget_); - } - if (trainCost_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, trainCost_); - } - if (!getStopReasonBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, stopReason_); - } - if (!getModelTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, modelType_); - } - if (nodeQps_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(13, nodeQps_); - } - if (nodeCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, nodeCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata other = - (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) obj; - - if (!getBaseModelId().equals(other.getBaseModelId())) return false; - if (getTrainBudget() != other.getTrainBudget()) return false; - if (getTrainCost() != other.getTrainCost()) return false; - if (!getStopReason().equals(other.getStopReason())) return false; - if (!getModelType().equals(other.getModelType())) return false; - if (java.lang.Double.doubleToLongBits(getNodeQps()) - != java.lang.Double.doubleToLongBits(other.getNodeQps())) return false; - if (getNodeCount() != other.getNodeCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BASE_MODEL_ID_FIELD_NUMBER; - hash = (53 * hash) + getBaseModelId().hashCode(); - hash = (37 * hash) + TRAIN_BUDGET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainBudget()); - hash = (37 * hash) + TRAIN_COST_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainCost()); - hash = (37 * hash) + STOP_REASON_FIELD_NUMBER; - hash = (53 * hash) + getStopReason().hashCode(); - hash = (37 * hash) + MODEL_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getModelType().hashCode(); - hash = (37 * hash) + NODE_QPS_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getNodeQps())); - hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNodeCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 for image classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageClassificationModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.class, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - baseModelId_ = ""; - - trainBudget_ = 0L; - - trainCost_ = 0L; - - stopReason_ = ""; - - modelType_ = ""; - - nodeQps_ = 0D; - - nodeCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata build() { - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata result = - new com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata(this); - result.baseModelId_ = baseModelId_; - result.trainBudget_ = trainBudget_; - result.trainCost_ = trainCost_; - result.stopReason_ = stopReason_; - result.modelType_ = modelType_; - result.nodeQps_ = nodeQps_; - result.nodeCount_ = nodeCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.getDefaultInstance()) - return this; - if (!other.getBaseModelId().isEmpty()) { - baseModelId_ = other.baseModelId_; - onChanged(); - } - if (other.getTrainBudget() != 0L) { - setTrainBudget(other.getTrainBudget()); - } - if (other.getTrainCost() != 0L) { - setTrainCost(other.getTrainCost()); - } - if (!other.getStopReason().isEmpty()) { - stopReason_ = other.stopReason_; - onChanged(); - } - if (!other.getModelType().isEmpty()) { - modelType_ = other.modelType_; - onChanged(); - } - if (other.getNodeQps() != 0D) { - setNodeQps(other.getNodeQps()); - } - if (other.getNodeCount() != 0L) { - setNodeCount(other.getNodeCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object baseModelId_ = ""; - /** - * - * - *
-     * Optional. The ID of the `base` model. If it is specified, the new model
-     * will be created based on the `base` model. Otherwise, the new model will be
-     * created from scratch. The `base` model must be in the same
-     * `project` and `location` as the new model to create, and have the same
-     * `model_type`.
-     * 
- * - * string base_model_id = 1; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The ID of the `base` model. If it is specified, the new model
-     * will be created based on the `base` model. Otherwise, the new model will be
-     * created from scratch. The `base` model must be in the same
-     * `project` and `location` as the new model to create, and have the same
-     * `model_type`.
-     * 
- * - * string base_model_id = 1; - * - * @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; - } - } - /** - * - * - *
-     * Optional. The ID of the `base` model. If it is specified, the new model
-     * will be created based on the `base` model. Otherwise, the new model will be
-     * created from scratch. The `base` model must be in the same
-     * `project` and `location` as the new model to create, and have the same
-     * `model_type`.
-     * 
- * - * string base_model_id = 1; - * - * @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; - } - /** - * - * - *
-     * Optional. The ID of the `base` model. If it is specified, the new model
-     * will be created based on the `base` model. Otherwise, the new model will be
-     * created from scratch. The `base` model must be in the same
-     * `project` and `location` as the new model to create, and have the same
-     * `model_type`.
-     * 
- * - * string base_model_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearBaseModelId() { - - baseModelId_ = getDefaultInstance().getBaseModelId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The ID of the `base` model. If it is specified, the new model
-     * will be created based on the `base` model. Otherwise, the new model will be
-     * created from scratch. The `base` model must be in the same
-     * `project` and `location` as the new model to create, and have the same
-     * `model_type`.
-     * 
- * - * string base_model_id = 1; - * - * @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 trainBudget_; - /** - * - * - *
-     * Required. The train budget of creating this model, expressed in hours. The
-     * actual `train_cost` will be equal or less than this value.
-     * 
- * - * int64 train_budget = 2; - * - * @return The trainBudget. - */ - public long getTrainBudget() { - return trainBudget_; - } - /** - * - * - *
-     * Required. The train budget of creating this model, expressed in hours. The
-     * actual `train_cost` will be equal or less than this value.
-     * 
- * - * int64 train_budget = 2; - * - * @param value The trainBudget to set. - * @return This builder for chaining. - */ - public Builder setTrainBudget(long value) { - - trainBudget_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The train budget of creating this model, expressed in hours. The
-     * actual `train_cost` will be equal or less than this value.
-     * 
- * - * int64 train_budget = 2; - * - * @return This builder for chaining. - */ - public Builder clearTrainBudget() { - - trainBudget_ = 0L; - onChanged(); - return this; - } - - private long trainCost_; - /** - * - * - *
-     * Output only. The actual train cost of creating this model, expressed in
-     * hours. If this model is created from a `base` model, the train cost used
-     * to create the `base` model are not included.
-     * 
- * - * int64 train_cost = 3; - * - * @return The trainCost. - */ - public long getTrainCost() { - return trainCost_; - } - /** - * - * - *
-     * Output only. The actual train cost of creating this model, expressed in
-     * hours. If this model is created from a `base` model, the train cost used
-     * to create the `base` model are not included.
-     * 
- * - * int64 train_cost = 3; - * - * @param value The trainCost to set. - * @return This builder for chaining. - */ - public Builder setTrainCost(long value) { - - trainCost_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The actual train cost of creating this model, expressed in
-     * hours. If this model is created from a `base` model, the train cost used
-     * to create the `base` model are not included.
-     * 
- * - * int64 train_cost = 3; - * - * @return This builder for chaining. - */ - public Builder clearTrainCost() { - - trainCost_ = 0L; - onChanged(); - return this; - } - - private java.lang.Object stopReason_ = ""; - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @return The stopReason. - */ - public java.lang.String getStopReason() { - java.lang.Object ref = stopReason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stopReason_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @return The bytes for stopReason. - */ - public com.google.protobuf.ByteString getStopReasonBytes() { - java.lang.Object ref = stopReason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stopReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @param value The stopReason to set. - * @return This builder for chaining. - */ - public Builder setStopReason(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - stopReason_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @return This builder for chaining. - */ - public Builder clearStopReason() { - - stopReason_ = getDefaultInstance().getStopReason(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @param value The bytes for stopReason to set. - * @return This builder for chaining. - */ - public Builder setStopReasonBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - stopReason_ = value; - onChanged(); - return this; - } - - private java.lang.Object modelType_ = ""; - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud` - Model to be used via prediction calls to AutoML API.
-     *               This is the default value.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards. Expected to have low latency, but may have
-     *               lower prediction quality than other models.
-     * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards.
-     * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-     *               providing prediction via AutoML API, can also be exported
-     *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-     *               Core ML afterwards.  Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * 
- * - * string model_type = 7; - * - * @return The modelType. - */ - public java.lang.String getModelType() { - java.lang.Object ref = modelType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud` - Model to be used via prediction calls to AutoML API.
-     *               This is the default value.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards. Expected to have low latency, but may have
-     *               lower prediction quality than other models.
-     * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards.
-     * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-     *               providing prediction via AutoML API, can also be exported
-     *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-     *               Core ML afterwards.  Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * 
- * - * string model_type = 7; - * - * @return The bytes for modelType. - */ - public com.google.protobuf.ByteString getModelTypeBytes() { - java.lang.Object ref = modelType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud` - Model to be used via prediction calls to AutoML API.
-     *               This is the default value.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards. Expected to have low latency, but may have
-     *               lower prediction quality than other models.
-     * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards.
-     * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-     *               providing prediction via AutoML API, can also be exported
-     *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-     *               Core ML afterwards.  Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * 
- * - * string model_type = 7; - * - * @param value The modelType to set. - * @return This builder for chaining. - */ - public Builder setModelType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - modelType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud` - Model to be used via prediction calls to AutoML API.
-     *               This is the default value.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards. Expected to have low latency, but may have
-     *               lower prediction quality than other models.
-     * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards.
-     * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-     *               providing prediction via AutoML API, can also be exported
-     *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-     *               Core ML afterwards.  Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * 
- * - * string model_type = 7; - * - * @return This builder for chaining. - */ - public Builder clearModelType() { - - modelType_ = getDefaultInstance().getModelType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud` - Model to be used via prediction calls to AutoML API.
-     *               This is the default value.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards. Expected to have low latency, but may have
-     *               lower prediction quality than other models.
-     * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-     *               ML afterwards.
-     * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-     *               providing prediction via AutoML API, can also be exported
-     *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-     *               Core ML afterwards.  Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * 
- * - * string model_type = 7; - * - * @param value The bytes for modelType to set. - * @return This builder for chaining. - */ - public Builder setModelTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - modelType_ = value; - onChanged(); - return this; - } - - private double nodeQps_; - /** - * - * - *
-     * Output only. An approximate number of online prediction QPS that can
-     * be supported by this model per each node on which it is deployed.
-     * 
- * - * double node_qps = 13; - * - * @return The nodeQps. - */ - public double getNodeQps() { - return nodeQps_; - } - /** - * - * - *
-     * Output only. An approximate number of online prediction QPS that can
-     * be supported by this model per each node on which it is deployed.
-     * 
- * - * double node_qps = 13; - * - * @param value The nodeQps to set. - * @return This builder for chaining. - */ - public Builder setNodeQps(double value) { - - nodeQps_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. An approximate number of online prediction QPS that can
-     * be supported by this model per each node on which it is deployed.
-     * 
- * - * double node_qps = 13; - * - * @return This builder for chaining. - */ - public Builder clearNodeQps() { - - nodeQps_ = 0D; - onChanged(); - return this; - } - - private long nodeCount_; - /** - * - * - *
-     * Output only. The number of nodes this model is deployed on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the node_qps field.
-     * 
- * - * int64 node_count = 14; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - /** - * - * - *
-     * Output only. The number of nodes this model is deployed on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the node_qps field.
-     * 
- * - * int64 node_count = 14; - * - * @param value The nodeCount to set. - * @return This builder for chaining. - */ - public Builder setNodeCount(long value) { - - nodeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of nodes this model is deployed on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the node_qps field.
-     * 
- * - * int64 node_count = 14; - * - * @return This builder for chaining. - */ - public Builder clearNodeCount() { - - nodeCount_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - private static final com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageClassificationModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageClassificationModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadataOrBuilder.java deleted file mode 100644 index 747152091..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageClassificationModelMetadataOrBuilder.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageClassificationModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The ID of the `base` model. If it is specified, the new model
-   * will be created based on the `base` model. Otherwise, the new model will be
-   * created from scratch. The `base` model must be in the same
-   * `project` and `location` as the new model to create, and have the same
-   * `model_type`.
-   * 
- * - * string base_model_id = 1; - * - * @return The baseModelId. - */ - java.lang.String getBaseModelId(); - /** - * - * - *
-   * Optional. The ID of the `base` model. If it is specified, the new model
-   * will be created based on the `base` model. Otherwise, the new model will be
-   * created from scratch. The `base` model must be in the same
-   * `project` and `location` as the new model to create, and have the same
-   * `model_type`.
-   * 
- * - * string base_model_id = 1; - * - * @return The bytes for baseModelId. - */ - com.google.protobuf.ByteString getBaseModelIdBytes(); - - /** - * - * - *
-   * Required. The train budget of creating this model, expressed in hours. The
-   * actual `train_cost` will be equal or less than this value.
-   * 
- * - * int64 train_budget = 2; - * - * @return The trainBudget. - */ - long getTrainBudget(); - - /** - * - * - *
-   * Output only. The actual train cost of creating this model, expressed in
-   * hours. If this model is created from a `base` model, the train cost used
-   * to create the `base` model are not included.
-   * 
- * - * int64 train_cost = 3; - * - * @return The trainCost. - */ - long getTrainCost(); - - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The stopReason. - */ - java.lang.String getStopReason(); - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The bytes for stopReason. - */ - com.google.protobuf.ByteString getStopReasonBytes(); - - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud` - Model to be used via prediction calls to AutoML API.
-   *               This is the default value.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards. Expected to have low latency, but may have
-   *               lower prediction quality than other models.
-   * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards.
-   * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-   *               providing prediction via AutoML API, can also be exported
-   *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-   *               Core ML afterwards.  Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * 
- * - * string model_type = 7; - * - * @return The modelType. - */ - java.lang.String getModelType(); - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud` - Model to be used via prediction calls to AutoML API.
-   *               This is the default value.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * *   `mobile-core-ml-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards. Expected to have low latency, but may have
-   *               lower prediction quality than other models.
-   * *   `mobile-core-ml-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core
-   *               ML afterwards.
-   * *   `mobile-core-ml-high-accuracy-1` - A model that, in addition to
-   *               providing prediction via AutoML API, can also be exported
-   *               (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with
-   *               Core ML afterwards.  Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * 
- * - * string model_type = 7; - * - * @return The bytes for modelType. - */ - com.google.protobuf.ByteString getModelTypeBytes(); - - /** - * - * - *
-   * Output only. An approximate number of online prediction QPS that can
-   * be supported by this model per each node on which it is deployed.
-   * 
- * - * double node_qps = 13; - * - * @return The nodeQps. - */ - double getNodeQps(); - - /** - * - * - *
-   * Output only. The number of nodes this model is deployed on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the node_qps field.
-   * 
- * - * int64 node_count = 14; - * - * @return The nodeCount. - */ - long getNodeCount(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotation.java deleted file mode 100644 index 9af41ede3..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotation.java +++ /dev/null @@ -1,832 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Annotation details for image object detection.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} - */ -public final class ImageObjectDetectionAnnotation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) - ImageObjectDetectionAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageObjectDetectionAnnotation.newBuilder() to construct. - private ImageObjectDetectionAnnotation( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageObjectDetectionAnnotation() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageObjectDetectionAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageObjectDetectionAnnotation( - 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.automl.v1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 21: - { - score_ = 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.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder.class); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.BoundingPoly boundingBox_; - /** - * - * - *
-   * Output only. The rectangle representing the object location.
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - * - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - * - * - *
-   * Output only. The rectangle representing the object location.
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - * - * @return The boundingBox. - */ - public com.google.cloud.automl.v1beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } - /** - * - * - *
-   * Output only. The rectangle representing the object location.
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - public com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int SCORE_FIELD_NUMBER = 2; - private float score_; - /** - * - * - *
-   * Output only. The confidence that this annotation is positive for the parent example,
-   * value in [0, 1], higher means higher positivity confidence.
-   * 
- * - * float score = 2; - * - * @return The score. - */ - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (boundingBox_ != null) { - output.writeMessage(1, getBoundingBox()); - } - if (score_ != 0F) { - output.writeFloat(2, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBoundingBox()); - } - if (score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation other = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) obj; - - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox().equals(other.getBoundingBox())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits(other.getScore())) return false; - if (!unknownFields.equals(other.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 (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Annotation details for image object detection.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation build() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation buildPartial() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation result = - new com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation(this); - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) { - return mergeFrom((com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation other) { - if (other - == com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance()) - return this; - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder> - boundingBoxBuilder_; - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - * - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - * - * @return The boundingBox. - */ - public com.google.cloud.automl.v1beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - public Builder setBoundingBox(com.google.cloud.automl.v1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - public Builder setBoundingBox( - com.google.cloud.automl.v1beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - public Builder mergeBoundingBox(com.google.cloud.automl.v1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.automl.v1beta1.BoundingPoly.newBuilder(boundingBox_) - .mergeFrom(value) - .buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - public com.google.cloud.automl.v1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - public com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } - } - /** - * - * - *
-     * Output only. The rectangle representing the object location.
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder>( - getBoundingBox(), getParentForChildren(), isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private float score_; - /** - * - * - *
-     * Output only. The confidence that this annotation is positive for the parent example,
-     * value in [0, 1], higher means higher positivity confidence.
-     * 
- * - * float score = 2; - * - * @return The score. - */ - public float getScore() { - return score_; - } - /** - * - * - *
-     * Output only. The confidence that this annotation is positive for the parent example,
-     * value in [0, 1], higher means higher positivity confidence.
-     * 
- * - * float score = 2; - * - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The confidence that this annotation is positive for the parent example,
-     * value in [0, 1], higher means higher positivity confidence.
-     * 
- * - * float score = 2; - * - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 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.automl.v1beta1.ImageObjectDetectionAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) - private static final com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageObjectDetectionAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageObjectDetectionAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotationOrBuilder.java deleted file mode 100644 index 2988e1bb4..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionAnnotationOrBuilder.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageObjectDetectionAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The rectangle representing the object location.
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - * - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - * - * - *
-   * Output only. The rectangle representing the object location.
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - * - * @return The boundingBox. - */ - com.google.cloud.automl.v1beta1.BoundingPoly getBoundingBox(); - /** - * - * - *
-   * Output only. The rectangle representing the object location.
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 1; - */ - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - * - * - *
-   * Output only. The confidence that this annotation is positive for the parent example,
-   * value in [0, 1], higher means higher positivity confidence.
-   * 
- * - * float score = 2; - * - * @return The score. - */ - float getScore(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadata.java deleted file mode 100644 index d7435ce81..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadata.java +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata specific to image object detection.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} - */ -public final class ImageObjectDetectionDatasetMetadata - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - ImageObjectDetectionDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageObjectDetectionDatasetMetadata.newBuilder() to construct. - private ImageObjectDetectionDatasetMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageObjectDetectionDatasetMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageObjectDetectionDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageObjectDetectionDatasetMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata other = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata specific to image object detection.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata build() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata result = - new com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageObjectDetectionDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageObjectDetectionDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadataOrBuilder.java deleted file mode 100644 index e2daa6796..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageObjectDetectionDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageObjectDetectionDatasetMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetrics.java deleted file mode 100644 index 8e3fbb702..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetrics.java +++ /dev/null @@ -1,1294 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model evaluation metrics for image object detection problems.
- * Evaluates prediction quality of labeled bounding boxes.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} - */ -public final class ImageObjectDetectionEvaluationMetrics - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - ImageObjectDetectionEvaluationMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageObjectDetectionEvaluationMetrics.newBuilder() to construct. - private ImageObjectDetectionEvaluationMetrics( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageObjectDetectionEvaluationMetrics() { - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageObjectDetectionEvaluationMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageObjectDetectionEvaluationMetrics( - 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: - { - evaluatedBoundingBoxCount_ = input.readInt32(); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry>(); - mutable_bitField0_ |= 0x00000001; - } - boundingBoxMetricsEntries_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.parser(), - extensionRegistry)); - break; - } - case 29: - { - boundingBoxMeanAveragePrecision_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder.class); - } - - public static final int EVALUATED_BOUNDING_BOX_COUNT_FIELD_NUMBER = 1; - private int evaluatedBoundingBoxCount_; - /** - * - * - *
-   * Output only. The total number of bounding boxes (i.e. summed over all
-   * images) the ground truth used to create this evaluation had.
-   * 
- * - * int32 evaluated_bounding_box_count = 1; - * - * @return The evaluatedBoundingBoxCount. - */ - public int getEvaluatedBoundingBoxCount() { - return evaluatedBoundingBoxCount_; - } - - public static final int BOUNDING_BOX_METRICS_ENTRIES_FIELD_NUMBER = 2; - private java.util.List - boundingBoxMetricsEntries_; - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesList() { - return boundingBoxMetricsEntries_; - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesOrBuilderList() { - return boundingBoxMetricsEntries_; - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public int getBoundingBoxMetricsEntriesCount() { - return boundingBoxMetricsEntries_.size(); - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getBoundingBoxMetricsEntries( - int index) { - return boundingBoxMetricsEntries_.get(index); - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder - getBoundingBoxMetricsEntriesOrBuilder(int index) { - return boundingBoxMetricsEntries_.get(index); - } - - public static final int BOUNDING_BOX_MEAN_AVERAGE_PRECISION_FIELD_NUMBER = 3; - private float boundingBoxMeanAveragePrecision_; - /** - * - * - *
-   * Output only. The single metric for bounding boxes evaluation:
-   * the mean_average_precision averaged over all bounding_box_metrics_entries.
-   * 
- * - * float bounding_box_mean_average_precision = 3; - * - * @return The boundingBoxMeanAveragePrecision. - */ - public float getBoundingBoxMeanAveragePrecision() { - return boundingBoxMeanAveragePrecision_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (evaluatedBoundingBoxCount_ != 0) { - output.writeInt32(1, evaluatedBoundingBoxCount_); - } - for (int i = 0; i < boundingBoxMetricsEntries_.size(); i++) { - output.writeMessage(2, boundingBoxMetricsEntries_.get(i)); - } - if (boundingBoxMeanAveragePrecision_ != 0F) { - output.writeFloat(3, boundingBoxMeanAveragePrecision_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (evaluatedBoundingBoxCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, evaluatedBoundingBoxCount_); - } - for (int i = 0; i < boundingBoxMetricsEntries_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, boundingBoxMetricsEntries_.get(i)); - } - if (boundingBoxMeanAveragePrecision_ != 0F) { - size += - com.google.protobuf.CodedOutputStream.computeFloatSize( - 3, boundingBoxMeanAveragePrecision_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics other = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) obj; - - if (getEvaluatedBoundingBoxCount() != other.getEvaluatedBoundingBoxCount()) return false; - if (!getBoundingBoxMetricsEntriesList().equals(other.getBoundingBoxMetricsEntriesList())) - return false; - if (java.lang.Float.floatToIntBits(getBoundingBoxMeanAveragePrecision()) - != java.lang.Float.floatToIntBits(other.getBoundingBoxMeanAveragePrecision())) return false; - if (!unknownFields.equals(other.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) + EVALUATED_BOUNDING_BOX_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getEvaluatedBoundingBoxCount(); - if (getBoundingBoxMetricsEntriesCount() > 0) { - hash = (37 * hash) + BOUNDING_BOX_METRICS_ENTRIES_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBoxMetricsEntriesList().hashCode(); - } - hash = (37 * hash) + BOUNDING_BOX_MEAN_AVERAGE_PRECISION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoundingBoxMeanAveragePrecision()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 evaluation metrics for image object detection problems.
-   * Evaluates prediction quality of labeled bounding boxes.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBoundingBoxMetricsEntriesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - evaluatedBoundingBoxCount_ = 0; - - if (boundingBoxMetricsEntriesBuilder_ == null) { - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - boundingBoxMetricsEntriesBuilder_.clear(); - } - boundingBoxMeanAveragePrecision_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionEvaluationMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics build() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics buildPartial() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics result = - new com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics(this); - int from_bitField0_ = bitField0_; - result.evaluatedBoundingBoxCount_ = evaluatedBoundingBoxCount_; - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.boundingBoxMetricsEntries_ = boundingBoxMetricsEntries_; - } else { - result.boundingBoxMetricsEntries_ = boundingBoxMetricsEntriesBuilder_.build(); - } - result.boundingBoxMeanAveragePrecision_ = boundingBoxMeanAveragePrecision_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics other) { - if (other - == com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance()) return this; - if (other.getEvaluatedBoundingBoxCount() != 0) { - setEvaluatedBoundingBoxCount(other.getEvaluatedBoundingBoxCount()); - } - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (!other.boundingBoxMetricsEntries_.isEmpty()) { - if (boundingBoxMetricsEntries_.isEmpty()) { - boundingBoxMetricsEntries_ = other.boundingBoxMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.addAll(other.boundingBoxMetricsEntries_); - } - onChanged(); - } - } else { - if (!other.boundingBoxMetricsEntries_.isEmpty()) { - if (boundingBoxMetricsEntriesBuilder_.isEmpty()) { - boundingBoxMetricsEntriesBuilder_.dispose(); - boundingBoxMetricsEntriesBuilder_ = null; - boundingBoxMetricsEntries_ = other.boundingBoxMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - boundingBoxMetricsEntriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBoundingBoxMetricsEntriesFieldBuilder() - : null; - } else { - boundingBoxMetricsEntriesBuilder_.addAllMessages(other.boundingBoxMetricsEntries_); - } - } - } - if (other.getBoundingBoxMeanAveragePrecision() != 0F) { - setBoundingBoxMeanAveragePrecision(other.getBoundingBoxMeanAveragePrecision()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private int evaluatedBoundingBoxCount_; - /** - * - * - *
-     * Output only. The total number of bounding boxes (i.e. summed over all
-     * images) the ground truth used to create this evaluation had.
-     * 
- * - * int32 evaluated_bounding_box_count = 1; - * - * @return The evaluatedBoundingBoxCount. - */ - public int getEvaluatedBoundingBoxCount() { - return evaluatedBoundingBoxCount_; - } - /** - * - * - *
-     * Output only. The total number of bounding boxes (i.e. summed over all
-     * images) the ground truth used to create this evaluation had.
-     * 
- * - * int32 evaluated_bounding_box_count = 1; - * - * @param value The evaluatedBoundingBoxCount to set. - * @return This builder for chaining. - */ - public Builder setEvaluatedBoundingBoxCount(int value) { - - evaluatedBoundingBoxCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The total number of bounding boxes (i.e. summed over all
-     * images) the ground truth used to create this evaluation had.
-     * 
- * - * int32 evaluated_bounding_box_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearEvaluatedBoundingBoxCount() { - - evaluatedBoundingBoxCount_ = 0; - onChanged(); - return this; - } - - private java.util.List - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - - private void ensureBoundingBoxMetricsEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - new java.util.ArrayList( - boundingBoxMetricsEntries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder> - boundingBoxMetricsEntriesBuilder_; - - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesList() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - } else { - return boundingBoxMetricsEntriesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public int getBoundingBoxMetricsEntriesCount() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return boundingBoxMetricsEntries_.size(); - } else { - return boundingBoxMetricsEntriesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getBoundingBoxMetricsEntries( - int index) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return boundingBoxMetricsEntries_.get(index); - } else { - return boundingBoxMetricsEntriesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder setBoundingBoxMetricsEntries( - int index, com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry value) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.set(index, value); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder setBoundingBoxMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder builderForValue) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.set(index, builderForValue.build()); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder addBoundingBoxMetricsEntries( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry value) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(value); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder addBoundingBoxMetricsEntries( - int index, com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry value) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(index, value); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder addBoundingBoxMetricsEntries( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder builderForValue) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(builderForValue.build()); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder addBoundingBoxMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder builderForValue) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(index, builderForValue.build()); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder addAllBoundingBoxMetricsEntries( - java.lang.Iterable - values) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, boundingBoxMetricsEntries_); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder clearBoundingBoxMetricsEntries() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public Builder removeBoundingBoxMetricsEntries(int index) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.remove(index); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder - getBoundingBoxMetricsEntriesBuilder(int index) { - return getBoundingBoxMetricsEntriesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder - getBoundingBoxMetricsEntriesOrBuilder(int index) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return boundingBoxMetricsEntries_.get(index); - } else { - return boundingBoxMetricsEntriesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder> - getBoundingBoxMetricsEntriesOrBuilderList() { - if (boundingBoxMetricsEntriesBuilder_ != null) { - return boundingBoxMetricsEntriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder - addBoundingBoxMetricsEntriesBuilder() { - return getBoundingBoxMetricsEntriesFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder - addBoundingBoxMetricsEntriesBuilder(int index) { - return getBoundingBoxMetricsEntriesFieldBuilder() - .addBuilder( - index, com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesBuilderList() { - return getBoundingBoxMetricsEntriesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder> - getBoundingBoxMetricsEntriesFieldBuilder() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - boundingBoxMetricsEntriesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder>( - boundingBoxMetricsEntries_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - boundingBoxMetricsEntries_ = null; - } - return boundingBoxMetricsEntriesBuilder_; - } - - private float boundingBoxMeanAveragePrecision_; - /** - * - * - *
-     * Output only. The single metric for bounding boxes evaluation:
-     * the mean_average_precision averaged over all bounding_box_metrics_entries.
-     * 
- * - * float bounding_box_mean_average_precision = 3; - * - * @return The boundingBoxMeanAveragePrecision. - */ - public float getBoundingBoxMeanAveragePrecision() { - return boundingBoxMeanAveragePrecision_; - } - /** - * - * - *
-     * Output only. The single metric for bounding boxes evaluation:
-     * the mean_average_precision averaged over all bounding_box_metrics_entries.
-     * 
- * - * float bounding_box_mean_average_precision = 3; - * - * @param value The boundingBoxMeanAveragePrecision to set. - * @return This builder for chaining. - */ - public Builder setBoundingBoxMeanAveragePrecision(float value) { - - boundingBoxMeanAveragePrecision_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The single metric for bounding boxes evaluation:
-     * the mean_average_precision averaged over all bounding_box_metrics_entries.
-     * 
- * - * float bounding_box_mean_average_precision = 3; - * - * @return This builder for chaining. - */ - public Builder clearBoundingBoxMeanAveragePrecision() { - - boundingBoxMeanAveragePrecision_ = 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.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - private static final com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics(); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageObjectDetectionEvaluationMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageObjectDetectionEvaluationMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetricsOrBuilder.java deleted file mode 100644 index 7d768cb43..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionEvaluationMetricsOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageObjectDetectionEvaluationMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The total number of bounding boxes (i.e. summed over all
-   * images) the ground truth used to create this evaluation had.
-   * 
- * - * int32 evaluated_bounding_box_count = 1; - * - * @return The evaluatedBoundingBoxCount. - */ - int getEvaluatedBoundingBoxCount(); - - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - java.util.List - getBoundingBoxMetricsEntriesList(); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getBoundingBoxMetricsEntries(int index); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - int getBoundingBoxMetricsEntriesCount(); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - java.util.List - getBoundingBoxMetricsEntriesOrBuilderList(); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - * - */ - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder - getBoundingBoxMetricsEntriesOrBuilder(int index); - - /** - * - * - *
-   * Output only. The single metric for bounding boxes evaluation:
-   * the mean_average_precision averaged over all bounding_box_metrics_entries.
-   * 
- * - * float bounding_box_mean_average_precision = 3; - * - * @return The boundingBoxMeanAveragePrecision. - */ - float getBoundingBoxMeanAveragePrecision(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadata.java deleted file mode 100644 index b3ce87239..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadata.java +++ /dev/null @@ -1,589 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model deployment metadata specific to Image Object Detection.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} - */ -public final class ImageObjectDetectionModelDeploymentMetadata - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - ImageObjectDetectionModelDeploymentMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageObjectDetectionModelDeploymentMetadata.newBuilder() to construct. - private ImageObjectDetectionModelDeploymentMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageObjectDetectionModelDeploymentMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageObjectDetectionModelDeploymentMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageObjectDetectionModelDeploymentMetadata( - 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: - { - nodeCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder - .class); - } - - public static final int NODE_COUNT_FIELD_NUMBER = 1; - private long nodeCount_; - /** - * - * - *
-   * Input only. The number of nodes to deploy the model on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the model's
-   * [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node].
-   * Must be between 1 and 100, inclusive on both ends.
-   * 
- * - * int64 node_count = 1; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (nodeCount_ != 0L) { - output.writeInt64(1, nodeCount_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (nodeCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, nodeCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata other = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) obj; - - if (getNodeCount() != other.getNodeCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNodeCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Model deployment metadata specific to Image Object Detection.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.Builder - .class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - nodeCount_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata build() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - buildPartial() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata result = - new com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata(this); - result.nodeCount_ = nodeCount_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - .getDefaultInstance()) return this; - if (other.getNodeCount() != 0L) { - setNodeCount(other.getNodeCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long nodeCount_; - /** - * - * - *
-     * Input only. The number of nodes to deploy the model on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the model's
-     * [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node].
-     * Must be between 1 and 100, inclusive on both ends.
-     * 
- * - * int64 node_count = 1; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - /** - * - * - *
-     * Input only. The number of nodes to deploy the model on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the model's
-     * [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node].
-     * Must be between 1 and 100, inclusive on both ends.
-     * 
- * - * int64 node_count = 1; - * - * @param value The nodeCount to set. - * @return This builder for chaining. - */ - public Builder setNodeCount(long value) { - - nodeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Input only. The number of nodes to deploy the model on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the model's
-     * [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node].
-     * Must be between 1 and 100, inclusive on both ends.
-     * 
- * - * int64 node_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearNodeCount() { - - nodeCount_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - private static final com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata(); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageObjectDetectionModelDeploymentMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageObjectDetectionModelDeploymentMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser - getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadataOrBuilder.java deleted file mode 100644 index c45fa4223..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelDeploymentMetadataOrBuilder.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageObjectDetectionModelDeploymentMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Input only. The number of nodes to deploy the model on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the model's
-   * [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node].
-   * Must be between 1 and 100, inclusive on both ends.
-   * 
- * - * int64 node_count = 1; - * - * @return The nodeCount. - */ - long getNodeCount(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadata.java deleted file mode 100644 index 90046ca97..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadata.java +++ /dev/null @@ -1,1415 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata specific to image object detection.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} - */ -public final class ImageObjectDetectionModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - ImageObjectDetectionModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageObjectDetectionModelMetadata.newBuilder() to construct. - private ImageObjectDetectionModelMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageObjectDetectionModelMetadata() { - modelType_ = ""; - stopReason_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageObjectDetectionModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImageObjectDetectionModelMetadata( - 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(); - - modelType_ = s; - break; - } - case 24: - { - nodeCount_ = input.readInt64(); - break; - } - case 33: - { - nodeQps_ = input.readDouble(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - stopReason_ = s; - break; - } - case 48: - { - trainBudgetMilliNodeHours_ = input.readInt64(); - break; - } - case 56: - { - 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.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder.class); - } - - public static final int MODEL_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object modelType_; - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-   *               calls to AutoML API. Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * *   `cloud-low-latency-1` -  A model to be used via prediction
-   *               calls to AutoML API. Expected to have low latency, but may
-   *               have lower prediction quality than other models.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * 
- * - * string model_type = 1; - * - * @return The modelType. - */ - public java.lang.String getModelType() { - java.lang.Object ref = modelType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelType_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-   *               calls to AutoML API. Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * *   `cloud-low-latency-1` -  A model to be used via prediction
-   *               calls to AutoML API. Expected to have low latency, but may
-   *               have lower prediction quality than other models.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * 
- * - * string model_type = 1; - * - * @return The bytes for modelType. - */ - public com.google.protobuf.ByteString getModelTypeBytes() { - java.lang.Object ref = modelType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NODE_COUNT_FIELD_NUMBER = 3; - private long nodeCount_; - /** - * - * - *
-   * Output only. The number of nodes this model is deployed on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the qps_per_node field.
-   * 
- * - * int64 node_count = 3; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - - public static final int NODE_QPS_FIELD_NUMBER = 4; - private double nodeQps_; - /** - * - * - *
-   * Output only. An approximate number of online prediction QPS that can
-   * be supported by this model per each node on which it is deployed.
-   * 
- * - * double node_qps = 4; - * - * @return The nodeQps. - */ - public double getNodeQps() { - return nodeQps_; - } - - public static final int STOP_REASON_FIELD_NUMBER = 5; - private volatile java.lang.Object stopReason_; - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The stopReason. - */ - public java.lang.String getStopReason() { - java.lang.Object ref = stopReason_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stopReason_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The bytes for stopReason. - */ - public com.google.protobuf.ByteString getStopReasonBytes() { - java.lang.Object ref = stopReason_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stopReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER = 6; - private long trainBudgetMilliNodeHours_; - /** - * - * - *
-   * 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 actual
-   * `train_cost` will be equal or less than this value. If further model
-   * training ceases to provide any improvements, it will stop without using
-   * full budget and the stop_reason will be `MODEL_CONVERGED`.
-   * Note, node_hour  = actual_hour * number_of_nodes_invovled.
-   * For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`,
-   * the train 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.
-   * For model type `mobile-low-latency-1`, `mobile-versatile-1`,
-   * `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`,
-   * `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train
-   * 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.
-   * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return The trainBudgetMilliNodeHours. - */ - public long getTrainBudgetMilliNodeHours() { - return trainBudgetMilliNodeHours_; - } - - public static final int TRAIN_COST_MILLI_NODE_HOURS_FIELD_NUMBER = 7; - private long trainCostMilliNodeHours_; - /** - * - * - *
-   * Output only. The actual train 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 the train budget.
-   * 
- * - * int64 train_cost_milli_node_hours = 7; - * - * @return The trainCostMilliNodeHours. - */ - 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 (!getModelTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, modelType_); - } - if (nodeCount_ != 0L) { - output.writeInt64(3, nodeCount_); - } - if (nodeQps_ != 0D) { - output.writeDouble(4, nodeQps_); - } - if (!getStopReasonBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, stopReason_); - } - if (trainBudgetMilliNodeHours_ != 0L) { - output.writeInt64(6, trainBudgetMilliNodeHours_); - } - if (trainCostMilliNodeHours_ != 0L) { - output.writeInt64(7, trainCostMilliNodeHours_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getModelTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, modelType_); - } - if (nodeCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, nodeCount_); - } - if (nodeQps_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(4, nodeQps_); - } - if (!getStopReasonBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, stopReason_); - } - if (trainBudgetMilliNodeHours_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, trainBudgetMilliNodeHours_); - } - if (trainCostMilliNodeHours_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, 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.automl.v1beta1.ImageObjectDetectionModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata other = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) obj; - - if (!getModelType().equals(other.getModelType())) return false; - if (getNodeCount() != other.getNodeCount()) return false; - if (java.lang.Double.doubleToLongBits(getNodeQps()) - != java.lang.Double.doubleToLongBits(other.getNodeQps())) return false; - if (!getStopReason().equals(other.getStopReason())) return false; - if (getTrainBudgetMilliNodeHours() != other.getTrainBudgetMilliNodeHours()) return false; - 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) + MODEL_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getModelType().hashCode(); - hash = (37 * hash) + NODE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNodeCount()); - hash = (37 * hash) + NODE_QPS_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getNodeQps())); - hash = (37 * hash) + STOP_REASON_FIELD_NUMBER; - hash = (53 * hash) + getStopReason().hashCode(); - hash = (37 * hash) + TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainBudgetMilliNodeHours()); - 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.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 image object detection.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.class, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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_ = ""; - - nodeCount_ = 0L; - - nodeQps_ = 0D; - - stopReason_ = ""; - - trainBudgetMilliNodeHours_ = 0L; - - trainCostMilliNodeHours_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ImageProto - .internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata build() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata result = - new com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata(this); - result.modelType_ = modelType_; - result.nodeCount_ = nodeCount_; - result.nodeQps_ = nodeQps_; - result.stopReason_ = stopReason_; - result.trainBudgetMilliNodeHours_ = trainBudgetMilliNodeHours_; - 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.automl.v1beta1.ImageObjectDetectionModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.getDefaultInstance()) - return this; - if (!other.getModelType().isEmpty()) { - modelType_ = other.modelType_; - onChanged(); - } - if (other.getNodeCount() != 0L) { - setNodeCount(other.getNodeCount()); - } - if (other.getNodeQps() != 0D) { - setNodeQps(other.getNodeQps()); - } - if (!other.getStopReason().isEmpty()) { - stopReason_ = other.stopReason_; - onChanged(); - } - if (other.getTrainBudgetMilliNodeHours() != 0L) { - setTrainBudgetMilliNodeHours(other.getTrainBudgetMilliNodeHours()); - } - 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.automl.v1beta1.ImageObjectDetectionModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object modelType_ = ""; - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-     *               calls to AutoML API. Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * *   `cloud-low-latency-1` -  A model to be used via prediction
-     *               calls to AutoML API. Expected to have low latency, but may
-     *               have lower prediction quality than other models.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * 
- * - * string model_type = 1; - * - * @return The modelType. - */ - public java.lang.String getModelType() { - java.lang.Object ref = modelType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-     *               calls to AutoML API. Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * *   `cloud-low-latency-1` -  A model to be used via prediction
-     *               calls to AutoML API. Expected to have low latency, but may
-     *               have lower prediction quality than other models.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * 
- * - * string model_type = 1; - * - * @return The bytes for modelType. - */ - public com.google.protobuf.ByteString getModelTypeBytes() { - java.lang.Object ref = modelType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-     *               calls to AutoML API. Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * *   `cloud-low-latency-1` -  A model to be used via prediction
-     *               calls to AutoML API. Expected to have low latency, but may
-     *               have lower prediction quality than other models.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * 
- * - * string model_type = 1; - * - * @param value The modelType to set. - * @return This builder for chaining. - */ - public Builder setModelType(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - modelType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-     *               calls to AutoML API. Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * *   `cloud-low-latency-1` -  A model to be used via prediction
-     *               calls to AutoML API. Expected to have low latency, but may
-     *               have lower prediction quality than other models.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * 
- * - * string model_type = 1; - * - * @return This builder for chaining. - */ - public Builder clearModelType() { - - modelType_ = getDefaultInstance().getModelType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Type of the model. The available values are:
-     * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-     *               calls to AutoML API. Expected to have a higher latency, but
-     *               should also have a higher prediction quality than other
-     *               models.
-     * *   `cloud-low-latency-1` -  A model to be used via prediction
-     *               calls to AutoML API. Expected to have low latency, but may
-     *               have lower prediction quality than other models.
-     * *   `mobile-low-latency-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards. Expected to have low latency, but
-     *               may have lower prediction quality than other models.
-     * *   `mobile-versatile-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.
-     * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-     *               prediction via AutoML API, can also be exported (see
-     *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-     *               with TensorFlow afterwards.  Expected to have a higher
-     *               latency, but should also have a higher prediction quality
-     *               than other models.
-     * 
- * - * string model_type = 1; - * - * @param value The bytes for modelType to set. - * @return This builder for chaining. - */ - public Builder setModelTypeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - modelType_ = value; - onChanged(); - return this; - } - - private long nodeCount_; - /** - * - * - *
-     * Output only. The number of nodes this model is deployed on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the qps_per_node field.
-     * 
- * - * int64 node_count = 3; - * - * @return The nodeCount. - */ - public long getNodeCount() { - return nodeCount_; - } - /** - * - * - *
-     * Output only. The number of nodes this model is deployed on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the qps_per_node field.
-     * 
- * - * int64 node_count = 3; - * - * @param value The nodeCount to set. - * @return This builder for chaining. - */ - public Builder setNodeCount(long value) { - - nodeCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of nodes this model is deployed on. A node is an
-     * abstraction of a machine resource, which can handle online prediction QPS
-     * as given in the qps_per_node field.
-     * 
- * - * int64 node_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearNodeCount() { - - nodeCount_ = 0L; - onChanged(); - return this; - } - - private double nodeQps_; - /** - * - * - *
-     * Output only. An approximate number of online prediction QPS that can
-     * be supported by this model per each node on which it is deployed.
-     * 
- * - * double node_qps = 4; - * - * @return The nodeQps. - */ - public double getNodeQps() { - return nodeQps_; - } - /** - * - * - *
-     * Output only. An approximate number of online prediction QPS that can
-     * be supported by this model per each node on which it is deployed.
-     * 
- * - * double node_qps = 4; - * - * @param value The nodeQps to set. - * @return This builder for chaining. - */ - public Builder setNodeQps(double value) { - - nodeQps_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. An approximate number of online prediction QPS that can
-     * be supported by this model per each node on which it is deployed.
-     * 
- * - * double node_qps = 4; - * - * @return This builder for chaining. - */ - public Builder clearNodeQps() { - - nodeQps_ = 0D; - onChanged(); - return this; - } - - private java.lang.Object stopReason_ = ""; - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @return The stopReason. - */ - public java.lang.String getStopReason() { - java.lang.Object ref = stopReason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - stopReason_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @return The bytes for stopReason. - */ - public com.google.protobuf.ByteString getStopReasonBytes() { - java.lang.Object ref = stopReason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - stopReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @param value The stopReason to set. - * @return This builder for chaining. - */ - public Builder setStopReason(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - stopReason_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @return This builder for chaining. - */ - public Builder clearStopReason() { - - stopReason_ = getDefaultInstance().getStopReason(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The reason that this create model operation stopped,
-     * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-     * 
- * - * string stop_reason = 5; - * - * @param value The bytes for stopReason to set. - * @return This builder for chaining. - */ - public Builder setStopReasonBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - stopReason_ = value; - onChanged(); - return this; - } - - private long trainBudgetMilliNodeHours_; - /** - * - * - *
-     * 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 actual
-     * `train_cost` will be equal or less than this value. If further model
-     * training ceases to provide any improvements, it will stop without using
-     * full budget and the stop_reason will be `MODEL_CONVERGED`.
-     * Note, node_hour  = actual_hour * number_of_nodes_invovled.
-     * For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`,
-     * the train 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.
-     * For model type `mobile-low-latency-1`, `mobile-versatile-1`,
-     * `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`,
-     * `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train
-     * 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.
-     * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return The trainBudgetMilliNodeHours. - */ - public long getTrainBudgetMilliNodeHours() { - return trainBudgetMilliNodeHours_; - } - /** - * - * - *
-     * 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 actual
-     * `train_cost` will be equal or less than this value. If further model
-     * training ceases to provide any improvements, it will stop without using
-     * full budget and the stop_reason will be `MODEL_CONVERGED`.
-     * Note, node_hour  = actual_hour * number_of_nodes_invovled.
-     * For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`,
-     * the train 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.
-     * For model type `mobile-low-latency-1`, `mobile-versatile-1`,
-     * `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`,
-     * `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train
-     * 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.
-     * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @param value The trainBudgetMilliNodeHours to set. - * @return This builder for chaining. - */ - public Builder setTrainBudgetMilliNodeHours(long value) { - - trainBudgetMilliNodeHours_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * 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 actual
-     * `train_cost` will be equal or less than this value. If further model
-     * training ceases to provide any improvements, it will stop without using
-     * full budget and the stop_reason will be `MODEL_CONVERGED`.
-     * Note, node_hour  = actual_hour * number_of_nodes_invovled.
-     * For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`,
-     * the train 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.
-     * For model type `mobile-low-latency-1`, `mobile-versatile-1`,
-     * `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`,
-     * `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train
-     * 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.
-     * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return This builder for chaining. - */ - public Builder clearTrainBudgetMilliNodeHours() { - - trainBudgetMilliNodeHours_ = 0L; - onChanged(); - return this; - } - - private long trainCostMilliNodeHours_; - /** - * - * - *
-     * Output only. The actual train 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 the train budget.
-     * 
- * - * int64 train_cost_milli_node_hours = 7; - * - * @return The trainCostMilliNodeHours. - */ - public long getTrainCostMilliNodeHours() { - return trainCostMilliNodeHours_; - } - /** - * - * - *
-     * Output only. The actual train 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 the train budget.
-     * 
- * - * int64 train_cost_milli_node_hours = 7; - * - * @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 train 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 the train budget.
-     * 
- * - * int64 train_cost_milli_node_hours = 7; - * - * @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.automl.v1beta1.ImageObjectDetectionModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - private static final com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageObjectDetectionModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageObjectDetectionModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadataOrBuilder.java deleted file mode 100644 index f65f5db9b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageObjectDetectionModelMetadataOrBuilder.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageObjectDetectionModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-   *               calls to AutoML API. Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * *   `cloud-low-latency-1` -  A model to be used via prediction
-   *               calls to AutoML API. Expected to have low latency, but may
-   *               have lower prediction quality than other models.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * 
- * - * string model_type = 1; - * - * @return The modelType. - */ - java.lang.String getModelType(); - /** - * - * - *
-   * Optional. Type of the model. The available values are:
-   * *   `cloud-high-accuracy-1` - (default) A model to be used via prediction
-   *               calls to AutoML API. Expected to have a higher latency, but
-   *               should also have a higher prediction quality than other
-   *               models.
-   * *   `cloud-low-latency-1` -  A model to be used via prediction
-   *               calls to AutoML API. Expected to have low latency, but may
-   *               have lower prediction quality than other models.
-   * *   `mobile-low-latency-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards. Expected to have low latency, but
-   *               may have lower prediction quality than other models.
-   * *   `mobile-versatile-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.
-   * *   `mobile-high-accuracy-1` - A model that, in addition to providing
-   *               prediction via AutoML API, can also be exported (see
-   *               [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device
-   *               with TensorFlow afterwards.  Expected to have a higher
-   *               latency, but should also have a higher prediction quality
-   *               than other models.
-   * 
- * - * string model_type = 1; - * - * @return The bytes for modelType. - */ - com.google.protobuf.ByteString getModelTypeBytes(); - - /** - * - * - *
-   * Output only. The number of nodes this model is deployed on. A node is an
-   * abstraction of a machine resource, which can handle online prediction QPS
-   * as given in the qps_per_node field.
-   * 
- * - * int64 node_count = 3; - * - * @return The nodeCount. - */ - long getNodeCount(); - - /** - * - * - *
-   * Output only. An approximate number of online prediction QPS that can
-   * be supported by this model per each node on which it is deployed.
-   * 
- * - * double node_qps = 4; - * - * @return The nodeQps. - */ - double getNodeQps(); - - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The stopReason. - */ - java.lang.String getStopReason(); - /** - * - * - *
-   * Output only. The reason that this create model operation stopped,
-   * e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`.
-   * 
- * - * string stop_reason = 5; - * - * @return The bytes for stopReason. - */ - com.google.protobuf.ByteString getStopReasonBytes(); - - /** - * - * - *
-   * 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 actual
-   * `train_cost` will be equal or less than this value. If further model
-   * training ceases to provide any improvements, it will stop without using
-   * full budget and the stop_reason will be `MODEL_CONVERGED`.
-   * Note, node_hour  = actual_hour * number_of_nodes_invovled.
-   * For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`,
-   * the train 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.
-   * For model type `mobile-low-latency-1`, `mobile-versatile-1`,
-   * `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`,
-   * `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train
-   * 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.
-   * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return The trainBudgetMilliNodeHours. - */ - long getTrainBudgetMilliNodeHours(); - - /** - * - * - *
-   * Output only. The actual train 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 the train budget.
-   * 
- * - * int64 train_cost_milli_node_hours = 7; - * - * @return The trainCostMilliNodeHours. - */ - long getTrainCostMilliNodeHours(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageOrBuilder.java deleted file mode 100644 index 584e00e09..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImageOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Image) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Image content represented as a stream of bytes.
-   * Note: As with all `bytes` fields, protobuffers use a pure binary
-   * representation, whereas JSON representations use base64.
-   * 
- * - * bytes image_bytes = 1; - * - * @return The imageBytes. - */ - com.google.protobuf.ByteString getImageBytes(); - - /** - * - * - *
-   * An input config specifying the content of the image.
-   * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - * - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - * - * - *
-   * An input config specifying the content of the image.
-   * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - * - * @return The inputConfig. - */ - com.google.cloud.automl.v1beta1.InputConfig getInputConfig(); - /** - * - * - *
-   * An input config specifying the content of the image.
-   * 
- * - * .google.cloud.automl.v1beta1.InputConfig input_config = 6; - */ - com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder(); - - /** - * - * - *
-   * Output only. HTTP URI to the thumbnail image.
-   * 
- * - * string thumbnail_uri = 4; - * - * @return The thumbnailUri. - */ - java.lang.String getThumbnailUri(); - /** - * - * - *
-   * Output only. HTTP URI to the thumbnail image.
-   * 
- * - * string thumbnail_uri = 4; - * - * @return The bytes for thumbnailUri. - */ - com.google.protobuf.ByteString getThumbnailUriBytes(); - - public com.google.cloud.automl.v1beta1.Image.DataCase getDataCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageProto.java deleted file mode 100644 index e12717b18..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImageProto.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/image.proto - -package com.google.cloud.automl.v1beta1; - -public final class ImageProto { - private ImageProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\'google/cloud/automl/v1beta1/image.prot" - + "o\022\033google.cloud.automl.v1beta1\032\031google/a" - + "pi/resource.proto\0321google/cloud/automl/v" - + "1beta1/annotation_spec.proto\0320google/clo" - + "ud/automl/v1beta1/classification.proto\032\037" - + "google/protobuf/timestamp.proto\032\034google/" - + "api/annotations.proto\"r\n\"ImageClassifica" - + "tionDatasetMetadata\022L\n\023classification_ty" - + "pe\030\001 \001(\0162/.google.cloud.automl.v1beta1.C" - + "lassificationType\"%\n#ImageObjectDetectio" - + "nDatasetMetadata\"\262\001\n ImageClassification" - + "ModelMetadata\022\025\n\rbase_model_id\030\001 \001(\t\022\024\n\014" - + "train_budget\030\002 \001(\003\022\022\n\ntrain_cost\030\003 \001(\003\022\023" - + "\n\013stop_reason\030\005 \001(\t\022\022\n\nmodel_type\030\007 \001(\t\022" - + "\020\n\010node_qps\030\r \001(\001\022\022\n\nnode_count\030\016 \001(\003\"\276\001" - + "\n!ImageObjectDetectionModelMetadata\022\022\n\nm" - + "odel_type\030\001 \001(\t\022\022\n\nnode_count\030\003 \001(\003\022\020\n\010n" - + "ode_qps\030\004 \001(\001\022\023\n\013stop_reason\030\005 \001(\t\022%\n\035tr" - + "ain_budget_milli_node_hours\030\006 \001(\003\022#\n\033tra" - + "in_cost_milli_node_hours\030\007 \001(\003\"@\n*ImageC" - + "lassificationModelDeploymentMetadata\022\022\n\n" - + "node_count\030\001 \001(\003\"A\n+ImageObjectDetection" - + "ModelDeploymentMetadata\022\022\n\nnode_count\030\001 " - + "\001(\003B\261\001\n\037com.google.cloud.automl.v1beta1B" - + "\nImageProtoP\001ZAgoogle.golang.org/genprot" - + "o/googleapis/cloud/automl/v1beta1;automl" - + "\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002\036Google:" - + ":Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageClassificationDatasetMetadata_descriptor, - new java.lang.String[] { - "ClassificationType", - }); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionDatasetMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelMetadata_descriptor, - new java.lang.String[] { - "BaseModelId", - "TrainBudget", - "TrainCost", - "StopReason", - "ModelType", - "NodeQps", - "NodeCount", - }); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelMetadata_descriptor, - new java.lang.String[] { - "ModelType", - "NodeCount", - "NodeQps", - "StopReason", - "TrainBudgetMilliNodeHours", - "TrainCostMilliNodeHours", - }); - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageClassificationModelDeploymentMetadata_descriptor, - new java.lang.String[] { - "NodeCount", - }); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImageObjectDetectionModelDeploymentMetadata_descriptor, - new java.lang.String[] { - "NodeCount", - }); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.automl.v1beta1.AnnotationSpecOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadata.java deleted file mode 100644 index 6d01d3581..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadata.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of ImportData operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImportDataOperationMetadata} - */ -public final class ImportDataOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.class, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ImportDataOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata other = - (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImportDataOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ImportDataOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ImportDataOperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImportDataOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImportDataOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ImportDataOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ImportDataOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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; - } - /** - * - * - *
-   * Details of ImportData operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImportDataOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImportDataOperationMetadata) - com.google.cloud.automl.v1beta1.ImportDataOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.class, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadata build() { - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata result = - new com.google.cloud.automl.v1beta1.ImportDataOperationMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ImportDataOperationMetadata other) { - if (other == com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImportDataOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImportDataOperationMetadata) - private static final com.google.cloud.automl.v1beta1.ImportDataOperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImportDataOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.ImportDataOperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadataOrBuilder.java deleted file mode 100644 index 95a58a64a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataOperationMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImportDataOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImportDataOperationMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequest.java deleted file mode 100644 index 9467d480a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequest.java +++ /dev/null @@ -1,966 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImportDataRequest} - */ -public final class ImportDataRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ImportDataRequest) - ImportDataRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImportDataRequest.newBuilder() to construct. - private ImportDataRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImportDataRequest() { - name_ = ""; - } - - @java.lang.Override - @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(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.automl.v1beta1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ImportDataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ImportDataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImportDataRequest.class, - com.google.cloud.automl.v1beta1.ImportDataRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Dataset name. Dataset must already exist. All imported
-   * annotations and examples will be added.
-   * 
- * - * - * string name = 1 [(.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) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Dataset name. Dataset must already exist. All imported
-   * annotations and examples will be added.
-   * 
- * - * - * string name = 1 [(.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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.InputConfig inputConfig_; - /** - * - * - *
-   * Required. The desired input location and its domain specific semantics,
-   * if any.
-   * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - * - * - *
-   * Required. The desired input location and its domain specific semantics,
-   * if any.
-   * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.InputConfig getInputConfig() { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance() - : inputConfig_; - } - /** - * - * - *
-   * Required. The desired input location and its domain specific semantics,
-   * if any.
-   * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (inputConfig_ != null) { - output.writeMessage(3, getInputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ImportDataRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ImportDataRequest other = - (com.google.cloud.automl.v1beta1.ImportDataRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (hasInputConfig() != other.hasInputConfig()) return false; - if (hasInputConfig()) { - if (!getInputConfig().equals(other.getInputConfig())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ImportDataRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ImportDataRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ImportDataRequest) - com.google.cloud.automl.v1beta1.ImportDataRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ImportDataRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ImportDataRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ImportDataRequest.class, - com.google.cloud.automl.v1beta1.ImportDataRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ImportDataRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ImportDataRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImportDataRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ImportDataRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImportDataRequest build() { - com.google.cloud.automl.v1beta1.ImportDataRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImportDataRequest buildPartial() { - com.google.cloud.automl.v1beta1.ImportDataRequest result = - new com.google.cloud.automl.v1beta1.ImportDataRequest(this); - result.name_ = name_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ImportDataRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ImportDataRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ImportDataRequest other) { - if (other == com.google.cloud.automl.v1beta1.ImportDataRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ImportDataRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ImportDataRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Dataset name. Dataset must already exist. All imported
-     * annotations and examples will be added.
-     * 
- * - * - * string name = 1 [(.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. Dataset name. Dataset must already exist. All imported
-     * annotations and examples will be added.
-     * 
- * - * - * 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. Dataset name. Dataset must already exist. All imported
-     * annotations and examples will be added.
-     * 
- * - * - * 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. Dataset name. Dataset must already exist. All imported
-     * annotations and examples will be added.
-     * 
- * - * - * 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. Dataset name. Dataset must already exist. All imported
-     * annotations and examples will be added.
-     * 
- * - * - * 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.automl.v1beta1.InputConfig inputConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder> - inputConfigBuilder_; - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the inputConfig field is set. - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The inputConfig. - */ - public com.google.cloud.automl.v1beta1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance() - : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInputConfig(com.google.cloud.automl.v1beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setInputConfig( - com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeInputConfig(com.google.cloud.automl.v1beta1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.automl.v1beta1.InputConfig.newBuilder(inputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null - ? com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance() - : inputConfig_; - } - } - /** - * - * - *
-     * Required. The desired input location and its domain specific semantics,
-     * if any.
-     * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder>( - getInputConfig(), getParentForChildren(), isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ImportDataRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ImportDataRequest) - private static final com.google.cloud.automl.v1beta1.ImportDataRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ImportDataRequest(); - } - - public static com.google.cloud.automl.v1beta1.ImportDataRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportDataRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportDataRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ImportDataRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequestOrBuilder.java deleted file mode 100644 index 3cdc3fbe0..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ImportDataRequestOrBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ImportDataRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ImportDataRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Dataset name. Dataset must already exist. All imported
-   * annotations and examples will be added.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Dataset name. Dataset must already exist. All imported
-   * annotations and examples will be added.
-   * 
- * - * - * 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 location and its domain specific semantics,
-   * if any.
-   * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the inputConfig field is set. - */ - boolean hasInputConfig(); - /** - * - * - *
-   * Required. The desired input location and its domain specific semantics,
-   * if any.
-   * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The inputConfig. - */ - com.google.cloud.automl.v1beta1.InputConfig getInputConfig(); - /** - * - * - *
-   * Required. The desired input location and its domain specific semantics,
-   * if any.
-   * 
- * - * - * .google.cloud.automl.v1beta1.InputConfig input_config = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfig.java deleted file mode 100644 index 5311e7f48..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfig.java +++ /dev/null @@ -1,2223 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Input configuration for ImportData Action.
- * The format of input depends on dataset_metadata the Dataset into which
- * the import is happening has. As input source the
- * [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
- * is expected, unless specified otherwise. Additionally any input .CSV file
- * by itself must be 100MB or smaller, unless specified otherwise.
- * If an "example" file (that is, image, video etc.) with identical content
- * (even if it had different GCS_FILE_PATH) is mentioned multiple times, then
- * its label, bounding boxes etc. are appended. The same file should be always
- * provided with the same ML_USE and GCS_FILE_PATH, if it is not, then
- * these values are nondeterministically selected from the given ones.
- * The formats are represented in EBNF with commas being literal and with
- * non-terminal symbols defined near the end of this comment. The formats are:
- *  *  For Image Classification:
- *         CSV file(s) with each line in format:
- *           ML_USE,GCS_FILE_PATH,LABEL,LABEL,...
- *           GCS_FILE_PATH leads to image of up to 30MB in size. Supported
- *           extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO
- *           For MULTICLASS classification type, at most one LABEL is allowed
- *           per image. If an image has not yet been labeled, then it should be
- *           mentioned just once with no LABEL.
- *         Some sample rows:
- *           TRAIN,gs://folder/image1.jpg,daisy
- *           TEST,gs://folder/image2.jpg,dandelion,tulip,rose
- *           UNASSIGNED,gs://folder/image3.jpg,daisy
- *           UNASSIGNED,gs://folder/image4.jpg
- *  *  For Image Object Detection:
- *         CSV file(s) with each line in format:
- *           ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,)
- *           GCS_FILE_PATH leads to image of up to 30MB in size. Supported
- *           extensions: .JPEG, .GIF, .PNG.
- *           Each image is assumed to be exhaustively labeled. The minimum
- *           allowed BOUNDING_BOX edge length is 0.01, and no more than 500
- *           BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined
- *           per line). If an image has not yet been labeled, then it should be
- *           mentioned just once with no LABEL and the ",,,,,,," in place of the
- *           BOUNDING_BOX. For images which are known to not contain any
- *           bounding boxes, they should be labelled explictly as
- *           "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the
- *           BOUNDING_BOX.
- *         Sample rows:
- *           TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,,
- *           TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,,
- *           UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3
- *           TEST,gs://folder/im3.png,,,,,,,,,
- *           TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,,
- *  *  For Video Classification:
- *         CSV file(s) with each line in format:
- *           ML_USE,GCS_FILE_PATH
- *           where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
- *           should lead to another .csv file which describes examples that have
- *           given ML_USE, using the following row format:
- *           GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,)
- *           Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
- *           to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
- *           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
- *           length of the video, and end has to be after the start. Any segment
- *           of a video which has one or more labels on it, is considered a
- *           hard negative for all other labels. Any segment with no labels on
- *           it is considered to be unknown. If a whole video is unknown, then
- *           it shuold be mentioned just once with ",," in place of LABEL,
- *           TIME_SEGMENT_START,TIME_SEGMENT_END.
- *         Sample top level CSV file:
- *           TRAIN,gs://folder/train_videos.csv
- *           TEST,gs://folder/test_videos.csv
- *           UNASSIGNED,gs://folder/other_videos.csv
- *         Sample rows of a CSV file for a particular ML_USE:
- *           gs://folder/video1.avi,car,120,180.000021
- *           gs://folder/video1.avi,bike,150,180.000021
- *           gs://folder/vid2.avi,car,0,60.5
- *           gs://folder/vid3.avi,,,
- *  *  For Video Object Tracking:
- *         CSV file(s) with each line in format:
- *           ML_USE,GCS_FILE_PATH
- *           where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
- *           should lead to another .csv file which describes examples that have
- *           given ML_USE, using one of the following row format:
- *           GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX
- *           or
- *           GCS_FILE_PATH,,,,,,,,,,
- *           Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
- *           to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
- *           Providing INSTANCE_IDs can help to obtain a better model. When
- *           a specific labeled entity leaves the video frame, and shows up
- *           afterwards it is not required, albeit preferable, that the same
- *           INSTANCE_ID is given to it.
- *           TIMESTAMP must be within the length of the video, the
- *           BOUNDING_BOX is assumed to be drawn on the closest video's frame
- *           to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected
- *           to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per
- *           frame are allowed. If a whole video is unknown, then it should be
- *           mentioned just once with ",,,,,,,,,," in place of LABEL,
- *           [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX.
- *         Sample top level CSV file:
- *           TRAIN,gs://folder/train_videos.csv
- *           TEST,gs://folder/test_videos.csv
- *           UNASSIGNED,gs://folder/other_videos.csv
- *         Seven sample rows of a CSV file for a particular ML_USE:
- *           gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9
- *           gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9
- *           gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3
- *           gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,,
- *           gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,,
- *           gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,,
- *           gs://folder/video2.avi,,,,,,,,,,,
- *  *  For Text Extraction:
- *         CSV file(s) with each line in format:
- *           ML_USE,GCS_FILE_PATH
- *           GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which
- *           either imports text in-line or as documents. Any given
- *           .JSONL file must be 100MB or smaller.
- *           The in-line .JSONL file contains, per line, a proto that wraps a
- *           TextSnippet proto (in json representation) followed by one or more
- *           AnnotationPayload protos (called annotations), which have
- *           display_name and text_extraction detail populated. The given text
- *           is expected to be annotated exhaustively, for example, if you look
- *           for animals and text contains "dolphin" that is not labeled, then
- *           "dolphin" is assumed to not be an animal. Any given text snippet
- *           content must be 10KB or smaller, and also be UTF-8 NFC encoded
- *           (ASCII already is).
- *           The document .JSONL file contains, per line, a proto that wraps a
- *           Document proto. The Document proto must have either document_text
- *           or input_config set. In document_text case, the Document proto may
- *           also contain the spatial information of the document, including
- *           layout, document dimension and page number. In input_config case,
- *           only PDF documents are supported now, and each document may be up
- *           to 2MB large. Currently, annotations on documents cannot be
- *           specified at import.
- *         Three sample CSV rows:
- *           TRAIN,gs://folder/file1.jsonl
- *           VALIDATE,gs://folder/file2.jsonl
- *           TEST,gs://folder/file3.jsonl
- *         Sample in-line JSON Lines file for entity extraction (presented here
- *         with artificial line breaks, but the only actual line break is
- *         denoted by \n).:
- *           {
- *             "document": {
- *               "document_text": {"content": "dog cat"}
- *               "layout": [
- *                 {
- *                   "text_segment": {
- *                     "start_offset": 0,
- *                     "end_offset": 3,
- *                   },
- *                   "page_number": 1,
- *                   "bounding_poly": {
- *                     "normalized_vertices": [
- *                       {"x": 0.1, "y": 0.1},
- *                       {"x": 0.1, "y": 0.3},
- *                       {"x": 0.3, "y": 0.3},
- *                       {"x": 0.3, "y": 0.1},
- *                     ],
- *                   },
- *                   "text_segment_type": TOKEN,
- *                 },
- *                 {
- *                   "text_segment": {
- *                     "start_offset": 4,
- *                     "end_offset": 7,
- *                   },
- *                   "page_number": 1,
- *                   "bounding_poly": {
- *                     "normalized_vertices": [
- *                       {"x": 0.4, "y": 0.1},
- *                       {"x": 0.4, "y": 0.3},
- *                       {"x": 0.8, "y": 0.3},
- *                       {"x": 0.8, "y": 0.1},
- *                     ],
- *                   },
- *                   "text_segment_type": TOKEN,
- *                 }
- *               ],
- *               "document_dimensions": {
- *                 "width": 8.27,
- *                 "height": 11.69,
- *                 "unit": INCH,
- *               }
- *               "page_count": 1,
- *             },
- *             "annotations": [
- *               {
- *                 "display_name": "animal",
- *                 "text_extraction": {"text_segment": {"start_offset": 0,
- *                 "end_offset": 3}}
- *               },
- *               {
- *                 "display_name": "animal",
- *                 "text_extraction": {"text_segment": {"start_offset": 4,
- *                 "end_offset": 7}}
- *               }
- *             ],
- *           }\n
- *           {
- *              "text_snippet": {
- *                "content": "This dog is good."
- *              },
- *              "annotations": [
- *                {
- *                  "display_name": "animal",
- *                  "text_extraction": {
- *                    "text_segment": {"start_offset": 5, "end_offset": 8}
- *                  }
- *                }
- *              ]
- *           }
- *         Sample document JSON Lines file (presented here with artificial line
- *         breaks, but the only actual line break is denoted by \n).:
- *           {
- *             "document": {
- *               "input_config": {
- *                 "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
- *                 }
- *               }
- *             }
- *           }\n
- *           {
- *             "document": {
- *               "input_config": {
- *                 "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
- *                 }
- *               }
- *             }
- *           }
- *  *  For Text Classification:
- *         CSV file(s) with each line in format:
- *           ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,...
- *           TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
- *           the column content is a valid gcs file path, i.e. prefixed by
- *           "gs://", it will be treated as a GCS_FILE_PATH, else if the content
- *           is enclosed within double quotes (""), it is
- *           treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
- *           must lead to a .txt file with UTF-8 encoding, for example,
- *           "gs://folder/content.txt", and the content in it is extracted
- *           as a text snippet. In TEXT_SNIPPET case, the column content
- *           excluding quotes is treated as to be imported text snippet. In
- *           both cases, the text snippet/file size must be within 128kB.
- *           Maximum 100 unique labels are allowed per CSV row.
- *         Sample rows:
- *           TRAIN,"They have bad food and very rude",RudeService,BadFood
- *           TRAIN,gs://folder/content.txt,SlowService
- *           TEST,"Typically always bad service there.",RudeService
- *           VALIDATE,"Stomach ache to go.",BadFood
- *  *  For Text Sentiment:
- *         CSV file(s) with each line in format:
- *           ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT
- *           TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
- *           the column content is a valid gcs file path, that is, prefixed by
- *           "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated
- *           as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
- *           must lead to a .txt file with UTF-8 encoding, for example,
- *           "gs://folder/content.txt", and the content in it is extracted
- *           as a text snippet. In TEXT_SNIPPET case, the column content itself
- *           is treated as to be imported text snippet. In both cases, the
- *           text snippet must be up to 500 characters long.
- *         Sample rows:
- *           TRAIN,"@freewrytin this is way too good for your product",2
- *           TRAIN,"I need this product so bad",3
- *           TEST,"Thank you for this product.",4
- *           VALIDATE,gs://folder/content.txt,2
- *   *  For Tables:
- *         Either
- *         [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
- * [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]
- *         can be used. All inputs is concatenated into a single
- * [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name]
- *         For gcs_source:
- *           CSV file(s), where the first row of the first file is the header,
- *           containing unique column names. If the first row of a subsequent
- *           file is the same as the header, then it is also treated as a
- *           header. All other rows contain values for the corresponding
- *           columns.
- *           Each .CSV file by itself must be 10GB or smaller, and their total
- *           size must be 100GB or smaller.
- *           First three sample rows of a CSV file:
- *           "Id","First Name","Last Name","Dob","Addresses"
- * "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
- * "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
- *         For bigquery_source:
- *           An URI of a BigQuery table. The user data size of the BigQuery
- *           table must be 100GB or smaller.
- *         An imported table must have between 2 and 1,000 columns, inclusive,
- *         and between 1000 and 100,000,000 rows, inclusive. There are at most 5
- *         import data running in parallel.
- *  Definitions:
- *  ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED"
- *           Describes how the given example (file) should be used for model
- *           training. "UNASSIGNED" can be used when user has no preference.
- *  GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png".
- *  LABEL = A display name of an object on an image, video etc., e.g. "dog".
- *          Must be up to 32 characters long and can consist only of ASCII
- *          Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9.
- *          For each label an AnnotationSpec is created which display_name
- *          becomes the label; AnnotationSpecs are given back in predictions.
- *  INSTANCE_ID = A positive integer that identifies a specific instance of a
- *                labeled entity on an example. Used e.g. to track two cars on
- *                a video while being able to tell apart which one is which.
- *  BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,,
- *                 A rectangle parallel to the frame of the example (image,
- *                 video). If 4 vertices are given they are connected by edges
- *                 in the order provided, if 2 are given they are recognized
- *                 as diagonally opposite vertices of the rectangle.
- *  VERTEX = COORDINATE,COORDINATE
- *           First coordinate is horizontal (x), the second is vertical (y).
- *  COORDINATE = A float in 0 to 1 range, relative to total length of
- *               image or video in given dimension. For fractions the
- *               leading non-decimal 0 can be omitted (i.e. 0.3 = .3).
- *               Point 0,0 is in top left.
- *  TIME_SEGMENT_START = TIME_OFFSET
- *                       Expresses a beginning, inclusive, of a time segment
- *                       within an example that has a time dimension
- *                       (e.g. video).
- *  TIME_SEGMENT_END = TIME_OFFSET
- *                     Expresses an end, exclusive, of a time segment within
- *                     an example that has a time dimension (e.g. video).
- *  TIME_OFFSET = A number of seconds as measured from the start of an
- *                example (e.g. video). Fractions are allowed, up to a
- *                microsecond precision. "inf" is allowed, and it means the end
- *                of the example.
- *  TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
- *                 double quotes ("").
- *  SENTIMENT = An integer between 0 and
- *              Dataset.text_sentiment_dataset_metadata.sentiment_max
- *              (inclusive). Describes the ordinal of the sentiment - higher
- *              value means a more positive sentiment. All the values are
- *              completely relative, i.e. neither 0 needs to mean a negative or
- *              neutral sentiment nor sentiment_max needs to mean a positive one
- *              - it is just required that 0 is the least positive sentiment
- *              in the data, and sentiment_max is the  most positive one.
- *              The SENTIMENT shouldn't be confused with "score" or "magnitude"
- *              from the previous Natural Language Sentiment Analysis API.
- *              All SENTIMENT values between 0 and sentiment_max must be
- *              represented in the imported data. On prediction the same 0 to
- *              sentiment_max range will be used. The difference between
- *              neighboring sentiment values needs not to be uniform, e.g. 1 and
- *              2 may be similar whereas the difference between 2 and 3 may be
- *              huge.
- *  Errors:
- *  If any of the provided CSV files can't be parsed or if more than certain
- *  percent of CSV rows cannot be processed then the operation fails and
- *  nothing is imported. Regardless of overall success or failure the per-row
- *  failures, up to a certain count cap, is listed in
- *  Operation.metadata.partial_failures.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.InputConfig} - */ -public final class InputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.InputConfig) - InputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use InputConfig.newBuilder() to construct. - private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private InputConfig() {} - - @java.lang.Override - @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(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.automl.v1beta1.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.automl.v1beta1.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.automl.v1beta1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = - com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put(params__.getKey(), params__.getValue()); - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.cloud.automl.v1beta1.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.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.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_InputConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.InputConfig.class, - com.google.cloud.automl.v1beta1.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(1), - 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 1: - 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 = 1; - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * In ImportData, the gcs_source points to a csv with structure described in
-   * the comment.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * In ImportData, the gcs_source points to a csv with structure described in
-   * the comment.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - public com.google.cloud.automl.v1beta1.GcsSource getGcsSource() { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * In ImportData, the gcs_source points to a csv with structure described in
-   * the comment.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - - public static final int BIGQUERY_SOURCE_FIELD_NUMBER = 3; - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - * - * @return Whether the bigquerySource field is set. - */ - public boolean hasBigquerySource() { - return sourceCase_ == 3; - } - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - * - * @return The bigquerySource. - */ - public com.google.cloud.automl.v1beta1.BigQuerySource getBigquerySource() { - if (sourceCase_ == 3) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - public com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { - if (sourceCase_ == 3) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - - public static final int PARAMS_FIELD_NUMBER = 2; - - private static final class ParamsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_InputConfig_ParamsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.cloud.automl.v1beta1.GcsSource) source_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 2); - if (sourceCase_ == 3) { - output.writeMessage(3, (com.google.cloud.automl.v1beta1.BigQuerySource) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.automl.v1beta1.GcsSource) source_); - } - for (java.util.Map.Entry entry : - internalGetParams().getMap().entrySet()) { - com.google.protobuf.MapEntry params__ = - ParamsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, params__); - } - if (sourceCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.automl.v1beta1.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.automl.v1beta1.InputConfig)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.InputConfig other = - (com.google.cloud.automl.v1beta1.InputConfig) obj; - - if (!internalGetParams().equals(other.internalGetParams())) return false; - if (!getSourceCase().equals(other.getSourceCase())) return false; - switch (sourceCase_) { - case 1: - if (!getGcsSource().equals(other.getGcsSource())) return false; - break; - case 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(); - if (!internalGetParams().getMap().isEmpty()) { - hash = (37 * hash) + PARAMS_FIELD_NUMBER; - hash = (53 * hash) + internalGetParams().hashCode(); - } - switch (sourceCase_) { - case 1: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 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.automl.v1beta1.InputConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.InputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Input configuration for ImportData Action.
-   * The format of input depends on dataset_metadata the Dataset into which
-   * the import is happening has. As input source the
-   * [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source]
-   * is expected, unless specified otherwise. Additionally any input .CSV file
-   * by itself must be 100MB or smaller, unless specified otherwise.
-   * If an "example" file (that is, image, video etc.) with identical content
-   * (even if it had different GCS_FILE_PATH) is mentioned multiple times, then
-   * its label, bounding boxes etc. are appended. The same file should be always
-   * provided with the same ML_USE and GCS_FILE_PATH, if it is not, then
-   * these values are nondeterministically selected from the given ones.
-   * The formats are represented in EBNF with commas being literal and with
-   * non-terminal symbols defined near the end of this comment. The formats are:
-   *  *  For Image Classification:
-   *         CSV file(s) with each line in format:
-   *           ML_USE,GCS_FILE_PATH,LABEL,LABEL,...
-   *           GCS_FILE_PATH leads to image of up to 30MB in size. Supported
-   *           extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO
-   *           For MULTICLASS classification type, at most one LABEL is allowed
-   *           per image. If an image has not yet been labeled, then it should be
-   *           mentioned just once with no LABEL.
-   *         Some sample rows:
-   *           TRAIN,gs://folder/image1.jpg,daisy
-   *           TEST,gs://folder/image2.jpg,dandelion,tulip,rose
-   *           UNASSIGNED,gs://folder/image3.jpg,daisy
-   *           UNASSIGNED,gs://folder/image4.jpg
-   *  *  For Image Object Detection:
-   *         CSV file(s) with each line in format:
-   *           ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,)
-   *           GCS_FILE_PATH leads to image of up to 30MB in size. Supported
-   *           extensions: .JPEG, .GIF, .PNG.
-   *           Each image is assumed to be exhaustively labeled. The minimum
-   *           allowed BOUNDING_BOX edge length is 0.01, and no more than 500
-   *           BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined
-   *           per line). If an image has not yet been labeled, then it should be
-   *           mentioned just once with no LABEL and the ",,,,,,," in place of the
-   *           BOUNDING_BOX. For images which are known to not contain any
-   *           bounding boxes, they should be labelled explictly as
-   *           "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the
-   *           BOUNDING_BOX.
-   *         Sample rows:
-   *           TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,,
-   *           TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,,
-   *           UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3
-   *           TEST,gs://folder/im3.png,,,,,,,,,
-   *           TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,,
-   *  *  For Video Classification:
-   *         CSV file(s) with each line in format:
-   *           ML_USE,GCS_FILE_PATH
-   *           where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
-   *           should lead to another .csv file which describes examples that have
-   *           given ML_USE, using the following row format:
-   *           GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,)
-   *           Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
-   *           to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
-   *           TIME_SEGMENT_START and TIME_SEGMENT_END must be within the
-   *           length of the video, and end has to be after the start. Any segment
-   *           of a video which has one or more labels on it, is considered a
-   *           hard negative for all other labels. Any segment with no labels on
-   *           it is considered to be unknown. If a whole video is unknown, then
-   *           it shuold be mentioned just once with ",," in place of LABEL,
-   *           TIME_SEGMENT_START,TIME_SEGMENT_END.
-   *         Sample top level CSV file:
-   *           TRAIN,gs://folder/train_videos.csv
-   *           TEST,gs://folder/test_videos.csv
-   *           UNASSIGNED,gs://folder/other_videos.csv
-   *         Sample rows of a CSV file for a particular ML_USE:
-   *           gs://folder/video1.avi,car,120,180.000021
-   *           gs://folder/video1.avi,bike,150,180.000021
-   *           gs://folder/vid2.avi,car,0,60.5
-   *           gs://folder/vid3.avi,,,
-   *  *  For Video Object Tracking:
-   *         CSV file(s) with each line in format:
-   *           ML_USE,GCS_FILE_PATH
-   *           where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH
-   *           should lead to another .csv file which describes examples that have
-   *           given ML_USE, using one of the following row format:
-   *           GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX
-   *           or
-   *           GCS_FILE_PATH,,,,,,,,,,
-   *           Here GCS_FILE_PATH leads to a video of up to 50GB in size and up
-   *           to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI.
-   *           Providing INSTANCE_IDs can help to obtain a better model. When
-   *           a specific labeled entity leaves the video frame, and shows up
-   *           afterwards it is not required, albeit preferable, that the same
-   *           INSTANCE_ID is given to it.
-   *           TIMESTAMP must be within the length of the video, the
-   *           BOUNDING_BOX is assumed to be drawn on the closest video's frame
-   *           to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected
-   *           to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per
-   *           frame are allowed. If a whole video is unknown, then it should be
-   *           mentioned just once with ",,,,,,,,,," in place of LABEL,
-   *           [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX.
-   *         Sample top level CSV file:
-   *           TRAIN,gs://folder/train_videos.csv
-   *           TEST,gs://folder/test_videos.csv
-   *           UNASSIGNED,gs://folder/other_videos.csv
-   *         Seven sample rows of a CSV file for a particular ML_USE:
-   *           gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9
-   *           gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9
-   *           gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3
-   *           gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,,
-   *           gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,,
-   *           gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,,
-   *           gs://folder/video2.avi,,,,,,,,,,,
-   *  *  For Text Extraction:
-   *         CSV file(s) with each line in format:
-   *           ML_USE,GCS_FILE_PATH
-   *           GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which
-   *           either imports text in-line or as documents. Any given
-   *           .JSONL file must be 100MB or smaller.
-   *           The in-line .JSONL file contains, per line, a proto that wraps a
-   *           TextSnippet proto (in json representation) followed by one or more
-   *           AnnotationPayload protos (called annotations), which have
-   *           display_name and text_extraction detail populated. The given text
-   *           is expected to be annotated exhaustively, for example, if you look
-   *           for animals and text contains "dolphin" that is not labeled, then
-   *           "dolphin" is assumed to not be an animal. Any given text snippet
-   *           content must be 10KB or smaller, and also be UTF-8 NFC encoded
-   *           (ASCII already is).
-   *           The document .JSONL file contains, per line, a proto that wraps a
-   *           Document proto. The Document proto must have either document_text
-   *           or input_config set. In document_text case, the Document proto may
-   *           also contain the spatial information of the document, including
-   *           layout, document dimension and page number. In input_config case,
-   *           only PDF documents are supported now, and each document may be up
-   *           to 2MB large. Currently, annotations on documents cannot be
-   *           specified at import.
-   *         Three sample CSV rows:
-   *           TRAIN,gs://folder/file1.jsonl
-   *           VALIDATE,gs://folder/file2.jsonl
-   *           TEST,gs://folder/file3.jsonl
-   *         Sample in-line JSON Lines file for entity extraction (presented here
-   *         with artificial line breaks, but the only actual line break is
-   *         denoted by \n).:
-   *           {
-   *             "document": {
-   *               "document_text": {"content": "dog cat"}
-   *               "layout": [
-   *                 {
-   *                   "text_segment": {
-   *                     "start_offset": 0,
-   *                     "end_offset": 3,
-   *                   },
-   *                   "page_number": 1,
-   *                   "bounding_poly": {
-   *                     "normalized_vertices": [
-   *                       {"x": 0.1, "y": 0.1},
-   *                       {"x": 0.1, "y": 0.3},
-   *                       {"x": 0.3, "y": 0.3},
-   *                       {"x": 0.3, "y": 0.1},
-   *                     ],
-   *                   },
-   *                   "text_segment_type": TOKEN,
-   *                 },
-   *                 {
-   *                   "text_segment": {
-   *                     "start_offset": 4,
-   *                     "end_offset": 7,
-   *                   },
-   *                   "page_number": 1,
-   *                   "bounding_poly": {
-   *                     "normalized_vertices": [
-   *                       {"x": 0.4, "y": 0.1},
-   *                       {"x": 0.4, "y": 0.3},
-   *                       {"x": 0.8, "y": 0.3},
-   *                       {"x": 0.8, "y": 0.1},
-   *                     ],
-   *                   },
-   *                   "text_segment_type": TOKEN,
-   *                 }
-   *               ],
-   *               "document_dimensions": {
-   *                 "width": 8.27,
-   *                 "height": 11.69,
-   *                 "unit": INCH,
-   *               }
-   *               "page_count": 1,
-   *             },
-   *             "annotations": [
-   *               {
-   *                 "display_name": "animal",
-   *                 "text_extraction": {"text_segment": {"start_offset": 0,
-   *                 "end_offset": 3}}
-   *               },
-   *               {
-   *                 "display_name": "animal",
-   *                 "text_extraction": {"text_segment": {"start_offset": 4,
-   *                 "end_offset": 7}}
-   *               }
-   *             ],
-   *           }\n
-   *           {
-   *              "text_snippet": {
-   *                "content": "This dog is good."
-   *              },
-   *              "annotations": [
-   *                {
-   *                  "display_name": "animal",
-   *                  "text_extraction": {
-   *                    "text_segment": {"start_offset": 5, "end_offset": 8}
-   *                  }
-   *                }
-   *              ]
-   *           }
-   *         Sample document JSON Lines file (presented here with artificial line
-   *         breaks, but the only actual line break is denoted by \n).:
-   *           {
-   *             "document": {
-   *               "input_config": {
-   *                 "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ]
-   *                 }
-   *               }
-   *             }
-   *           }\n
-   *           {
-   *             "document": {
-   *               "input_config": {
-   *                 "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ]
-   *                 }
-   *               }
-   *             }
-   *           }
-   *  *  For Text Classification:
-   *         CSV file(s) with each line in format:
-   *           ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,...
-   *           TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
-   *           the column content is a valid gcs file path, i.e. prefixed by
-   *           "gs://", it will be treated as a GCS_FILE_PATH, else if the content
-   *           is enclosed within double quotes (""), it is
-   *           treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
-   *           must lead to a .txt file with UTF-8 encoding, for example,
-   *           "gs://folder/content.txt", and the content in it is extracted
-   *           as a text snippet. In TEXT_SNIPPET case, the column content
-   *           excluding quotes is treated as to be imported text snippet. In
-   *           both cases, the text snippet/file size must be within 128kB.
-   *           Maximum 100 unique labels are allowed per CSV row.
-   *         Sample rows:
-   *           TRAIN,"They have bad food and very rude",RudeService,BadFood
-   *           TRAIN,gs://folder/content.txt,SlowService
-   *           TEST,"Typically always bad service there.",RudeService
-   *           VALIDATE,"Stomach ache to go.",BadFood
-   *  *  For Text Sentiment:
-   *         CSV file(s) with each line in format:
-   *           ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT
-   *           TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If
-   *           the column content is a valid gcs file path, that is, prefixed by
-   *           "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated
-   *           as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path
-   *           must lead to a .txt file with UTF-8 encoding, for example,
-   *           "gs://folder/content.txt", and the content in it is extracted
-   *           as a text snippet. In TEXT_SNIPPET case, the column content itself
-   *           is treated as to be imported text snippet. In both cases, the
-   *           text snippet must be up to 500 characters long.
-   *         Sample rows:
-   *           TRAIN,"@freewrytin this is way too good for your product",2
-   *           TRAIN,"I need this product so bad",3
-   *           TEST,"Thank you for this product.",4
-   *           VALIDATE,gs://folder/content.txt,2
-   *   *  For Tables:
-   *         Either
-   *         [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or
-   * [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]
-   *         can be used. All inputs is concatenated into a single
-   * [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name]
-   *         For gcs_source:
-   *           CSV file(s), where the first row of the first file is the header,
-   *           containing unique column names. If the first row of a subsequent
-   *           file is the same as the header, then it is also treated as a
-   *           header. All other rows contain values for the corresponding
-   *           columns.
-   *           Each .CSV file by itself must be 10GB or smaller, and their total
-   *           size must be 100GB or smaller.
-   *           First three sample rows of a CSV file:
-   *           "Id","First Name","Last Name","Dob","Addresses"
-   * "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]"
-   * "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]}
-   *         For bigquery_source:
-   *           An URI of a BigQuery table. The user data size of the BigQuery
-   *           table must be 100GB or smaller.
-   *         An imported table must have between 2 and 1,000 columns, inclusive,
-   *         and between 1000 and 100,000,000 rows, inclusive. There are at most 5
-   *         import data running in parallel.
-   *  Definitions:
-   *  ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED"
-   *           Describes how the given example (file) should be used for model
-   *           training. "UNASSIGNED" can be used when user has no preference.
-   *  GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png".
-   *  LABEL = A display name of an object on an image, video etc., e.g. "dog".
-   *          Must be up to 32 characters long and can consist only of ASCII
-   *          Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9.
-   *          For each label an AnnotationSpec is created which display_name
-   *          becomes the label; AnnotationSpecs are given back in predictions.
-   *  INSTANCE_ID = A positive integer that identifies a specific instance of a
-   *                labeled entity on an example. Used e.g. to track two cars on
-   *                a video while being able to tell apart which one is which.
-   *  BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,,
-   *                 A rectangle parallel to the frame of the example (image,
-   *                 video). If 4 vertices are given they are connected by edges
-   *                 in the order provided, if 2 are given they are recognized
-   *                 as diagonally opposite vertices of the rectangle.
-   *  VERTEX = COORDINATE,COORDINATE
-   *           First coordinate is horizontal (x), the second is vertical (y).
-   *  COORDINATE = A float in 0 to 1 range, relative to total length of
-   *               image or video in given dimension. For fractions the
-   *               leading non-decimal 0 can be omitted (i.e. 0.3 = .3).
-   *               Point 0,0 is in top left.
-   *  TIME_SEGMENT_START = TIME_OFFSET
-   *                       Expresses a beginning, inclusive, of a time segment
-   *                       within an example that has a time dimension
-   *                       (e.g. video).
-   *  TIME_SEGMENT_END = TIME_OFFSET
-   *                     Expresses an end, exclusive, of a time segment within
-   *                     an example that has a time dimension (e.g. video).
-   *  TIME_OFFSET = A number of seconds as measured from the start of an
-   *                example (e.g. video). Fractions are allowed, up to a
-   *                microsecond precision. "inf" is allowed, and it means the end
-   *                of the example.
-   *  TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within
-   *                 double quotes ("").
-   *  SENTIMENT = An integer between 0 and
-   *              Dataset.text_sentiment_dataset_metadata.sentiment_max
-   *              (inclusive). Describes the ordinal of the sentiment - higher
-   *              value means a more positive sentiment. All the values are
-   *              completely relative, i.e. neither 0 needs to mean a negative or
-   *              neutral sentiment nor sentiment_max needs to mean a positive one
-   *              - it is just required that 0 is the least positive sentiment
-   *              in the data, and sentiment_max is the  most positive one.
-   *              The SENTIMENT shouldn't be confused with "score" or "magnitude"
-   *              from the previous Natural Language Sentiment Analysis API.
-   *              All SENTIMENT values between 0 and sentiment_max must be
-   *              represented in the imported data. On prediction the same 0 to
-   *              sentiment_max range will be used. The difference between
-   *              neighboring sentiment values needs not to be uniform, e.g. 1 and
-   *              2 may be similar whereas the difference between 2 and 3 may be
-   *              huge.
-   *  Errors:
-   *  If any of the provided CSV files can't be parsed or if more than certain
-   *  percent of CSV rows cannot be processed then the operation fails and
-   *  nothing is imported. Regardless of overall success or failure the per-row
-   *  failures, up to a certain count cap, is listed in
-   *  Operation.metadata.partial_failures.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.InputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.InputConfig) - com.google.cloud.automl.v1beta1.InputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_InputConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.InputConfig.class, - com.google.cloud.automl.v1beta1.InputConfig.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.InputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableParams().clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_InputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.InputConfig getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.InputConfig build() { - com.google.cloud.automl.v1beta1.InputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.InputConfig buildPartial() { - com.google.cloud.automl.v1beta1.InputConfig result = - new com.google.cloud.automl.v1beta1.InputConfig(this); - int from_bitField0_ = bitField0_; - if (sourceCase_ == 1) { - 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.params_ = internalGetParams(); - result.params_.makeImmutable(); - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.InputConfig) { - return mergeFrom((com.google.cloud.automl.v1beta1.InputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.InputConfig other) { - if (other == com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance()) return this; - internalGetMutableParams().mergeFrom(other.internalGetParams()); - 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.automl.v1beta1.InputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.InputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder> - gcsSourceBuilder_; - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - public com.google.cloud.automl.v1beta1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.automl.v1beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.automl.v1beta1.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 1; - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.automl.v1beta1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1 - && source_ != com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance()) { - source_ = - com.google.cloud.automl.v1beta1.GcsSource.newBuilder( - (com.google.cloud.automl.v1beta1.GcsSource) source_) - .mergeFrom(value) - .buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 1) { - gcsSourceBuilder_.mergeFrom(value); - } - gcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - } - gcsSourceBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSource.Builder getGcsSourceBuilder() { - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - public com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsSource) source_; - } - return com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location for the input content.
-     * In ImportData, the gcs_source points to a csv with structure described in
-     * the comment.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.cloud.automl.v1beta1.GcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsSource, - com.google.cloud.automl.v1beta1.GcsSource.Builder, - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder>( - (com.google.cloud.automl.v1beta1.GcsSource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged(); - ; - return gcsSourceBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQuerySource, - com.google.cloud.automl.v1beta1.BigQuerySource.Builder, - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder> - bigquerySourceBuilder_; - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - * - * @return Whether the bigquerySource field is set. - */ - public boolean hasBigquerySource() { - return sourceCase_ == 3; - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - * - * @return The bigquerySource. - */ - public com.google.cloud.automl.v1beta1.BigQuerySource getBigquerySource() { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 3) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } else { - if (sourceCase_ == 3) { - return bigquerySourceBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - public Builder setBigquerySource(com.google.cloud.automl.v1beta1.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 for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - public Builder setBigquerySource( - com.google.cloud.automl.v1beta1.BigQuerySource.Builder builderForValue) { - if (bigquerySourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - bigquerySourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 3; - return this; - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - public Builder mergeBigquerySource(com.google.cloud.automl.v1beta1.BigQuerySource value) { - if (bigquerySourceBuilder_ == null) { - if (sourceCase_ == 3 - && source_ != com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance()) { - source_ = - com.google.cloud.automl.v1beta1.BigQuerySource.newBuilder( - (com.google.cloud.automl.v1beta1.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 for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.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 for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - public com.google.cloud.automl.v1beta1.BigQuerySource.Builder getBigquerySourceBuilder() { - return getBigquerySourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - public com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder() { - if ((sourceCase_ == 3) && (bigquerySourceBuilder_ != null)) { - return bigquerySourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 3) { - return (com.google.cloud.automl.v1beta1.BigQuerySource) source_; - } - return com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location for the input content.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQuerySource, - com.google.cloud.automl.v1beta1.BigQuerySource.Builder, - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder> - getBigquerySourceFieldBuilder() { - if (bigquerySourceBuilder_ == null) { - if (!(sourceCase_ == 3)) { - source_ = com.google.cloud.automl.v1beta1.BigQuerySource.getDefaultInstance(); - } - bigquerySourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQuerySource, - com.google.cloud.automl.v1beta1.BigQuerySource.Builder, - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder>( - (com.google.cloud.automl.v1beta1.BigQuerySource) source_, - getParentForChildren(), - isClean()); - source_ = null; - } - sourceCase_ = 3; - onChanged(); - ; - return bigquerySourceBuilder_; - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - private com.google.protobuf.MapField - internalGetMutableParams() { - onChanged(); - ; - if (params_ == null) { - params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - } - if (!params_.isMutable()) { - params_ = params_.copy(); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-     * Additional domain-specific parameters describing the semantic of the
-     * imported data, any string must be up to 25000
-     * characters long.
-     * *  For Tables:
-     *    `schema_inference_version` - (integer) Required. The version of the
-     *        algorithm that should be used for the initial inference of the
-     *        schema (columns' DataTypes) of the table the data is being imported
-     *        into. Allowed values: "1".
-     * 
- * - * map<string, string> params = 2; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-     * Additional domain-specific parameters describing the semantic of the
-     * imported data, any string must be up to 25000
-     * characters long.
-     * *  For Tables:
-     *    `schema_inference_version` - (integer) Required. The version of the
-     *        algorithm that should be used for the initial inference of the
-     *        schema (columns' DataTypes) of the table the data is being imported
-     *        into. Allowed values: "1".
-     * 
- * - * map<string, string> params = 2; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-     * Additional domain-specific parameters describing the semantic of the
-     * imported data, any string must be up to 25000
-     * characters long.
-     * *  For Tables:
-     *    `schema_inference_version` - (integer) Required. The version of the
-     *        algorithm that should be used for the initial inference of the
-     *        schema (columns' DataTypes) of the table the data is being imported
-     *        into. Allowed values: "1".
-     * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Additional domain-specific parameters describing the semantic of the
-     * imported data, any string must be up to 25000
-     * characters long.
-     * *  For Tables:
-     *    `schema_inference_version` - (integer) Required. The version of the
-     *        algorithm that should be used for the initial inference of the
-     *        schema (columns' DataTypes) of the table the data is being imported
-     *        into. Allowed values: "1".
-     * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearParams() { - internalGetMutableParams().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Additional domain-specific parameters describing the semantic of the
-     * imported data, any string must be up to 25000
-     * characters long.
-     * *  For Tables:
-     *    `schema_inference_version` - (integer) Required. The version of the
-     *        algorithm that should be used for the initial inference of the
-     *        schema (columns' DataTypes) of the table the data is being imported
-     *        into. Allowed values: "1".
-     * 
- * - * map<string, string> params = 2; - */ - public Builder removeParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableParams() { - return internalGetMutableParams().getMutableMap(); - } - /** - * - * - *
-     * Additional domain-specific parameters describing the semantic of the
-     * imported data, any string must be up to 25000
-     * characters long.
-     * *  For Tables:
-     *    `schema_inference_version` - (integer) Required. The version of the
-     *        algorithm that should be used for the initial inference of the
-     *        schema (columns' DataTypes) of the table the data is being imported
-     *        into. Allowed values: "1".
-     * 
- * - * map<string, string> params = 2; - */ - public Builder putParams(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Additional domain-specific parameters describing the semantic of the
-     * imported data, any string must be up to 25000
-     * characters long.
-     * *  For Tables:
-     *    `schema_inference_version` - (integer) Required. The version of the
-     *        algorithm that should be used for the initial inference of the
-     *        schema (columns' DataTypes) of the table the data is being imported
-     *        into. Allowed values: "1".
-     * 
- * - * map<string, string> params = 2; - */ - public Builder putAllParams(java.util.Map values) { - internalGetMutableParams().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.InputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.InputConfig) - private static final com.google.cloud.automl.v1beta1.InputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.InputConfig(); - } - - public static com.google.cloud.automl.v1beta1.InputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.InputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfigOrBuilder.java deleted file mode 100644 index 5ee1048e9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/InputConfigOrBuilder.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface InputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.InputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * In ImportData, the gcs_source points to a csv with structure described in
-   * the comment.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return Whether the gcsSource field is set. - */ - boolean hasGcsSource(); - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * In ImportData, the gcs_source points to a csv with structure described in
-   * the comment.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - * - * @return The gcsSource. - */ - com.google.cloud.automl.v1beta1.GcsSource getGcsSource(); - /** - * - * - *
-   * The Google Cloud Storage location for the input content.
-   * In ImportData, the gcs_source points to a csv with structure described in
-   * the comment.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsSource gcs_source = 1; - */ - com.google.cloud.automl.v1beta1.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - * - * @return Whether the bigquerySource field is set. - */ - boolean hasBigquerySource(); - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - * - * @return The bigquerySource. - */ - com.google.cloud.automl.v1beta1.BigQuerySource getBigquerySource(); - /** - * - * - *
-   * The BigQuery location for the input content.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQuerySource bigquery_source = 3; - */ - com.google.cloud.automl.v1beta1.BigQuerySourceOrBuilder getBigquerySourceOrBuilder(); - - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - int getParamsCount(); - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - boolean containsParams(java.lang.String key); - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getParams(); - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - java.util.Map getParamsMap(); - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Additional domain-specific parameters describing the semantic of the
-   * imported data, any string must be up to 25000
-   * characters long.
-   * *  For Tables:
-   *    `schema_inference_version` - (integer) Required. The version of the
-   *        algorithm that should be used for the initial inference of the
-   *        schema (columns' DataTypes) of the table the data is being imported
-   *        into. Allowed values: "1".
-   * 
- * - * map<string, string> params = 2; - */ - java.lang.String getParamsOrThrow(java.lang.String key); - - public com.google.cloud.automl.v1beta1.InputConfig.SourceCase getSourceCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Io.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Io.java deleted file mode 100644 index 46f7c67fe..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Io.java +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public final class Io { - private Io() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_InputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_InputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_InputConfig_ParamsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_InputConfig_ParamsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_OutputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_ParamsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_ParamsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GcsSource_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BigQuerySource_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BigQuerySource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GcsDestination_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BigQueryDestination_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BigQueryDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_GcrDestination_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_GcrDestination_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n$google/cloud/automl/v1beta1/io.proto\022\033" - + "google.cloud.automl.v1beta1\032\034google/api/" - + "annotations.proto\"\222\002\n\013InputConfig\022<\n\ngcs" - + "_source\030\001 \001(\0132&.google.cloud.automl.v1be" - + "ta1.GcsSourceH\000\022F\n\017bigquery_source\030\003 \001(\013" - + "2+.google.cloud.automl.v1beta1.BigQueryS" - + "ourceH\000\022D\n\006params\030\002 \003(\01324.google.cloud.a" - + "utoml.v1beta1.InputConfig.ParamsEntry\032-\n" - + "\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" - + ":\0028\001B\010\n\006source\"\251\001\n\027BatchPredictInputConf" - + "ig\022<\n\ngcs_source\030\001 \001(\0132&.google.cloud.au" - + "toml.v1beta1.GcsSourceH\000\022F\n\017bigquery_sou" - + "rce\030\002 \001(\0132+.google.cloud.automl.v1beta1." - + "BigQuerySourceH\000B\010\n\006source\"Q\n\023DocumentIn" - + "putConfig\022:\n\ngcs_source\030\001 \001(\0132&.google.c" - + "loud.automl.v1beta1.GcsSource\"\267\001\n\014Output" - + "Config\022F\n\017gcs_destination\030\001 \001(\0132+.google" - + ".cloud.automl.v1beta1.GcsDestinationH\000\022P" - + "\n\024bigquery_destination\030\002 \001(\01320.google.cl" - + "oud.automl.v1beta1.BigQueryDestinationH\000" - + "B\r\n\013destination\"\303\001\n\030BatchPredictOutputCo" - + "nfig\022F\n\017gcs_destination\030\001 \001(\0132+.google.c" - + "loud.automl.v1beta1.GcsDestinationH\000\022P\n\024" - + "bigquery_destination\030\002 \001(\01320.google.clou" - + "d.automl.v1beta1.BigQueryDestinationH\000B\r" - + "\n\013destination\"\317\002\n\027ModelExportOutputConfi" - + "g\022F\n\017gcs_destination\030\001 \001(\0132+.google.clou" - + "d.automl.v1beta1.GcsDestinationH\000\022F\n\017gcr" - + "_destination\030\003 \001(\0132+.google.cloud.automl" - + ".v1beta1.GcrDestinationH\000\022\024\n\014model_forma" - + "t\030\004 \001(\t\022P\n\006params\030\002 \003(\0132@.google.cloud.a" - + "utoml.v1beta1.ModelExportOutputConfig.Pa" - + "ramsEntry\032-\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001B\r\n\013destination\"\206\001\n#Expo" - + "rtEvaluatedExamplesOutputConfig\022P\n\024bigqu" - + "ery_destination\030\002 \001(\01320.google.cloud.aut" - + "oml.v1beta1.BigQueryDestinationH\000B\r\n\013des" - + "tination\"\037\n\tGcsSource\022\022\n\ninput_uris\030\001 \003(" - + "\t\"#\n\016BigQuerySource\022\021\n\tinput_uri\030\001 \001(\t\"+" - + "\n\016GcsDestination\022\031\n\021output_uri_prefix\030\001 " - + "\001(\t\")\n\023BigQueryDestination\022\022\n\noutput_uri" - + "\030\001 \001(\t\"$\n\016GcrDestination\022\022\n\noutput_uri\030\001" - + " \001(\tB\245\001\n\037com.google.cloud.automl.v1beta1" - + "P\001ZAgoogle.golang.org/genproto/googleapi" - + "s/cloud/automl/v1beta1;automl\312\002\033Google\\C" - + "loud\\AutoMl\\V1beta1\352\002\036Google::Cloud::Aut" - + "oML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_InputConfig_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_InputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_InputConfig_descriptor, - new java.lang.String[] { - "GcsSource", "BigquerySource", "Params", "Source", - }); - internal_static_google_cloud_automl_v1beta1_InputConfig_ParamsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_InputConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_automl_v1beta1_InputConfig_ParamsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_InputConfig_ParamsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BatchPredictInputConfig_descriptor, - new java.lang.String[] { - "GcsSource", "BigquerySource", "Source", - }); - internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DocumentInputConfig_descriptor, - new java.lang.String[] { - "GcsSource", - }); - internal_static_google_cloud_automl_v1beta1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_OutputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_OutputConfig_descriptor, - new java.lang.String[] { - "GcsDestination", "BigqueryDestination", "Destination", - }); - internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BatchPredictOutputConfig_descriptor, - new java.lang.String[] { - "GcsDestination", "BigqueryDestination", "Destination", - }); - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_descriptor, - new java.lang.String[] { - "GcsDestination", "GcrDestination", "ModelFormat", "Params", "Destination", - }); - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_ParamsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_ParamsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_ParamsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOutputConfig_descriptor, - new java.lang.String[] { - "BigqueryDestination", "Destination", - }); - internal_static_google_cloud_automl_v1beta1_GcsSource_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_automl_v1beta1_GcsSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GcsSource_descriptor, - new java.lang.String[] { - "InputUris", - }); - internal_static_google_cloud_automl_v1beta1_BigQuerySource_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_automl_v1beta1_BigQuerySource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BigQuerySource_descriptor, - new java.lang.String[] { - "InputUri", - }); - internal_static_google_cloud_automl_v1beta1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_automl_v1beta1_GcsDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GcsDestination_descriptor, - new java.lang.String[] { - "OutputUriPrefix", - }); - internal_static_google_cloud_automl_v1beta1_BigQueryDestination_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_automl_v1beta1_BigQueryDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BigQueryDestination_descriptor, - new java.lang.String[] { - "OutputUri", - }); - internal_static_google_cloud_automl_v1beta1_GcrDestination_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_automl_v1beta1_GcrDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_GcrDestination_descriptor, - new java.lang.String[] { - "OutputUri", - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequest.java deleted file mode 100644 index 2a470a8a1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequest.java +++ /dev/null @@ -1,1381 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListColumnSpecsRequest} - */ -public final class ListColumnSpecsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListColumnSpecsRequest) - ListColumnSpecsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListColumnSpecsRequest.newBuilder() to construct. - private ListColumnSpecsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListColumnSpecsRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListColumnSpecsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListColumnSpecsRequest( - 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.protobuf.FieldMask.Builder subBuilder = null; - if (fieldMask_ != null) { - subBuilder = fieldMask_.toBuilder(); - } - fieldMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fieldMask_); - fieldMask_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.class, - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource name of the table spec to list column specs from.
-   * 
- * - * - * 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) { - 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 table spec to list column specs from.
-   * 
- * - * - * 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 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 FIELD_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask fieldMask_; - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMask_ != null; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - return getFieldMask(); - } - - public static final int FILTER_FIELD_NUMBER = 3; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - 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; - } - } - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - * - * - *
-   * Requested page size. The server can return fewer results than requested.
-   * If unspecified, the server will pick a default size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 6; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (fieldMask_ != null) { - output.writeMessage(2, getFieldMask()); - } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (fieldMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldMask()); - } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListColumnSpecsRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest other = - (com.google.cloud.automl.v1beta1.ListColumnSpecsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasFieldMask() != other.hasFieldMask()) return false; - if (hasFieldMask()) { - if (!getFieldMask().equals(other.getFieldMask())) return false; - } - if (!getFilter().equals(other.getFilter())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasFieldMask()) { - hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; - hash = (53 * hash) + getFieldMask().hashCode(); - } - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListColumnSpecsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListColumnSpecsRequest) - com.google.cloud.automl.v1beta1.ListColumnSpecsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.class, - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (fieldMaskBuilder_ == null) { - fieldMask_ = null; - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsRequest build() { - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsRequest buildPartial() { - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest result = - new com.google.cloud.automl.v1beta1.ListColumnSpecsRequest(this); - result.parent_ = parent_; - if (fieldMaskBuilder_ == null) { - result.fieldMask_ = fieldMask_; - } else { - result.fieldMask_ = fieldMaskBuilder_.build(); - } - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ListColumnSpecsRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListColumnSpecsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListColumnSpecsRequest other) { - if (other == com.google.cloud.automl.v1beta1.ListColumnSpecsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasFieldMask()) { - mergeFieldMask(other.getFieldMask()); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListColumnSpecsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListColumnSpecsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource name of the table spec to list column specs from.
-     * 
- * - * - * 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 table spec to list column specs from.
-     * 
- * - * - * 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 table spec to list column specs from.
-     * 
- * - * - * 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 table spec to list column specs from.
-     * 
- * - * - * 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 table spec to list column specs from.
-     * 
- * - * - * 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.protobuf.FieldMask fieldMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - fieldMaskBuilder_; - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMaskBuilder_ != null || fieldMask_ != null; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - if (fieldMaskBuilder_ == null) { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } else { - return fieldMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldMask_ = value; - onChanged(); - } else { - fieldMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (fieldMaskBuilder_ == null) { - fieldMask_ = builderForValue.build(); - onChanged(); - } else { - fieldMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (fieldMask_ != null) { - fieldMask_ = - com.google.protobuf.FieldMask.newBuilder(fieldMask_).mergeFrom(value).buildPartial(); - } else { - fieldMask_ = value; - } - onChanged(); - } else { - fieldMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder clearFieldMask() { - if (fieldMaskBuilder_ == null) { - fieldMask_ = null; - onChanged(); - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { - - onChanged(); - return getFieldMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - if (fieldMaskBuilder_ != null) { - return fieldMaskBuilder_.getMessageOrBuilder(); - } else { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getFieldMaskFieldBuilder() { - if (fieldMaskBuilder_ == null) { - fieldMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getFieldMask(), getParentForChildren(), isClean()); - fieldMask_ = null; - } - return fieldMaskBuilder_; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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; - } - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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; - } - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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; - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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_; - /** - * - * - *
-     * Requested page size. The server can return fewer results than requested.
-     * If unspecified, the server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Requested page size. The server can return fewer results than requested.
-     * If unspecified, the server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Requested page size. The server can return fewer results than requested.
-     * If unspecified, the server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ListColumnSpecsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListColumnSpecsRequest) - private static final com.google.cloud.automl.v1beta1.ListColumnSpecsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListColumnSpecsRequest(); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListColumnSpecsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListColumnSpecsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequestOrBuilder.java deleted file mode 100644 index b8510abc7..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsRequestOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListColumnSpecsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListColumnSpecsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the table spec to list column specs from.
-   * 
- * - * - * 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 table spec to list column specs from.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - boolean hasFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - com.google.protobuf.FieldMask getFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); - - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Requested page size. The server can return fewer results than requested.
-   * If unspecified, the server will pick a default size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponse.java deleted file mode 100644 index be99ecce0..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponse.java +++ /dev/null @@ -1,1132 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListColumnSpecsResponse} - */ -public final class ListColumnSpecsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListColumnSpecsResponse) - ListColumnSpecsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListColumnSpecsResponse.newBuilder() to construct. - private ListColumnSpecsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListColumnSpecsResponse() { - columnSpecs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListColumnSpecsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListColumnSpecsResponse( - 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)) { - columnSpecs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - columnSpecs_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.ColumnSpec.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)) { - columnSpecs_ = java.util.Collections.unmodifiableList(columnSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.class, - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.Builder.class); - } - - public static final int COLUMN_SPECS_FIELD_NUMBER = 1; - private java.util.List columnSpecs_; - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public java.util.List getColumnSpecsList() { - return columnSpecs_; - } - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public java.util.List - getColumnSpecsOrBuilderList() { - return columnSpecs_; - } - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public int getColumnSpecsCount() { - return columnSpecs_.size(); - } - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getColumnSpecs(int index) { - return columnSpecs_.get(index); - } - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getColumnSpecsOrBuilder(int index) { - return columnSpecs_.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 [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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) { - 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 [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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 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 < columnSpecs_.size(); i++) { - output.writeMessage(1, columnSpecs_.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 < columnSpecs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, columnSpecs_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListColumnSpecsResponse)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse other = - (com.google.cloud.automl.v1beta1.ListColumnSpecsResponse) obj; - - if (!getColumnSpecsList().equals(other.getColumnSpecsList())) 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 (getColumnSpecsCount() > 0) { - hash = (37 * hash) + COLUMN_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getColumnSpecsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListColumnSpecsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListColumnSpecsResponse) - com.google.cloud.automl.v1beta1.ListColumnSpecsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.class, - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getColumnSpecsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (columnSpecsBuilder_ == null) { - columnSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - columnSpecsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListColumnSpecsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsResponse getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsResponse build() { - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsResponse buildPartial() { - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse result = - new com.google.cloud.automl.v1beta1.ListColumnSpecsResponse(this); - int from_bitField0_ = bitField0_; - if (columnSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - columnSpecs_ = java.util.Collections.unmodifiableList(columnSpecs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.columnSpecs_ = columnSpecs_; - } else { - result.columnSpecs_ = columnSpecsBuilder_.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.automl.v1beta1.ListColumnSpecsResponse) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListColumnSpecsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListColumnSpecsResponse other) { - if (other == com.google.cloud.automl.v1beta1.ListColumnSpecsResponse.getDefaultInstance()) - return this; - if (columnSpecsBuilder_ == null) { - if (!other.columnSpecs_.isEmpty()) { - if (columnSpecs_.isEmpty()) { - columnSpecs_ = other.columnSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureColumnSpecsIsMutable(); - columnSpecs_.addAll(other.columnSpecs_); - } - onChanged(); - } - } else { - if (!other.columnSpecs_.isEmpty()) { - if (columnSpecsBuilder_.isEmpty()) { - columnSpecsBuilder_.dispose(); - columnSpecsBuilder_ = null; - columnSpecs_ = other.columnSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - columnSpecsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getColumnSpecsFieldBuilder() - : null; - } else { - columnSpecsBuilder_.addAllMessages(other.columnSpecs_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListColumnSpecsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListColumnSpecsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List columnSpecs_ = - java.util.Collections.emptyList(); - - private void ensureColumnSpecsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - columnSpecs_ = - new java.util.ArrayList(columnSpecs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - columnSpecsBuilder_; - - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public java.util.List getColumnSpecsList() { - if (columnSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(columnSpecs_); - } else { - return columnSpecsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public int getColumnSpecsCount() { - if (columnSpecsBuilder_ == null) { - return columnSpecs_.size(); - } else { - return columnSpecsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getColumnSpecs(int index) { - if (columnSpecsBuilder_ == null) { - return columnSpecs_.get(index); - } else { - return columnSpecsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder setColumnSpecs(int index, com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (columnSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnSpecsIsMutable(); - columnSpecs_.set(index, value); - onChanged(); - } else { - columnSpecsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder setColumnSpecs( - int index, com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (columnSpecsBuilder_ == null) { - ensureColumnSpecsIsMutable(); - columnSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - columnSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder addColumnSpecs(com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (columnSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnSpecsIsMutable(); - columnSpecs_.add(value); - onChanged(); - } else { - columnSpecsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder addColumnSpecs(int index, com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (columnSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnSpecsIsMutable(); - columnSpecs_.add(index, value); - onChanged(); - } else { - columnSpecsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder addColumnSpecs( - com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (columnSpecsBuilder_ == null) { - ensureColumnSpecsIsMutable(); - columnSpecs_.add(builderForValue.build()); - onChanged(); - } else { - columnSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder addColumnSpecs( - int index, com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (columnSpecsBuilder_ == null) { - ensureColumnSpecsIsMutable(); - columnSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - columnSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder addAllColumnSpecs( - java.lang.Iterable values) { - if (columnSpecsBuilder_ == null) { - ensureColumnSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columnSpecs_); - onChanged(); - } else { - columnSpecsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder clearColumnSpecs() { - if (columnSpecsBuilder_ == null) { - columnSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - columnSpecsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public Builder removeColumnSpecs(int index) { - if (columnSpecsBuilder_ == null) { - ensureColumnSpecsIsMutable(); - columnSpecs_.remove(index); - onChanged(); - } else { - columnSpecsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder getColumnSpecsBuilder(int index) { - return getColumnSpecsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getColumnSpecsOrBuilder(int index) { - if (columnSpecsBuilder_ == null) { - return columnSpecs_.get(index); - } else { - return columnSpecsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public java.util.List - getColumnSpecsOrBuilderList() { - if (columnSpecsBuilder_ != null) { - return columnSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(columnSpecs_); - } - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder addColumnSpecsBuilder() { - return getColumnSpecsFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance()); - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder addColumnSpecsBuilder(int index) { - return getColumnSpecsFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance()); - } - /** - * - * - *
-     * The column specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - public java.util.List - getColumnSpecsBuilderList() { - return getColumnSpecsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - getColumnSpecsFieldBuilder() { - if (columnSpecsBuilder_ == null) { - columnSpecsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder>( - columnSpecs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - columnSpecs_ = null; - } - return columnSpecsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to retrieve next page of results.
-     * Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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 [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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 [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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 [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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 [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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.automl.v1beta1.ListColumnSpecsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListColumnSpecsResponse) - private static final com.google.cloud.automl.v1beta1.ListColumnSpecsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListColumnSpecsResponse(); - } - - public static com.google.cloud.automl.v1beta1.ListColumnSpecsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListColumnSpecsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListColumnSpecsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListColumnSpecsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponseOrBuilder.java deleted file mode 100644 index fb3efe275..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListColumnSpecsResponseOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListColumnSpecsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListColumnSpecsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - java.util.List getColumnSpecsList(); - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - com.google.cloud.automl.v1beta1.ColumnSpec getColumnSpecs(int index); - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - int getColumnSpecsCount(); - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - java.util.List - getColumnSpecsOrBuilderList(); - /** - * - * - *
-   * The column specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec column_specs = 1; - */ - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getColumnSpecsOrBuilder(int index); - - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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 [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequest.java deleted file mode 100644 index c2ac6238b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequest.java +++ /dev/null @@ -1,1143 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListDatasetsRequest} - */ -public final class ListDatasetsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListDatasetsRequest) - ListDatasetsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListDatasetsRequest.newBuilder() to construct. - private ListDatasetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListDatasetsRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @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 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListDatasetsRequest.class, - com.google.cloud.automl.v1beta1.ListDatasetsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource name of the project from which to list datasets.
-   * 
- * - * - * 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) { - 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 project from which to list datasets.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 3; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `dataset_metadata` - for existence of the case (e.g.
-   *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-   *   * `translation_dataset_metadata:*` --> The dataset has
-   *                                          translation_dataset_metadata.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `dataset_metadata` - for existence of the case (e.g.
-   *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-   *   * `translation_dataset_metadata:*` --> The dataset has
-   *                                          translation_dataset_metadata.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - * - * - *
-   * Requested page size. Server may return fewer results than requested.
-   * If unspecified, server will pick a default size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 6; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-   * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-   * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListDatasetsRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListDatasetsRequest other = - (com.google.cloud.automl.v1beta1.ListDatasetsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ListDatasetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListDatasetsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListDatasetsRequest) - com.google.cloud.automl.v1beta1.ListDatasetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListDatasetsRequest.class, - com.google.cloud.automl.v1beta1.ListDatasetsRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListDatasetsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListDatasetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsRequest build() { - com.google.cloud.automl.v1beta1.ListDatasetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsRequest buildPartial() { - com.google.cloud.automl.v1beta1.ListDatasetsRequest result = - new com.google.cloud.automl.v1beta1.ListDatasetsRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ListDatasetsRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListDatasetsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListDatasetsRequest other) { - if (other == com.google.cloud.automl.v1beta1.ListDatasetsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListDatasetsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListDatasetsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource name of the project from which to list datasets.
-     * 
- * - * - * 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 project from which to list datasets.
-     * 
- * - * - * 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 project from which to list datasets.
-     * 
- * - * - * 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 project from which to list datasets.
-     * 
- * - * - * 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 project from which to list datasets.
-     * 
- * - * - * 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.
-     *   * `dataset_metadata` - for existence of the case (e.g.
-     *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-     *   * `translation_dataset_metadata:*` --> The dataset has
-     *                                          translation_dataset_metadata.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `dataset_metadata` - for existence of the case (e.g.
-     *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-     *   * `translation_dataset_metadata:*` --> The dataset has
-     *                                          translation_dataset_metadata.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `dataset_metadata` - for existence of the case (e.g.
-     *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-     *   * `translation_dataset_metadata:*` --> The dataset has
-     *                                          translation_dataset_metadata.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `dataset_metadata` - for existence of the case (e.g.
-     *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-     *   * `translation_dataset_metadata:*` --> The dataset has
-     *                                          translation_dataset_metadata.
-     * 
- * - * string filter = 3; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * An expression for filtering the results of the request.
-     *   * `dataset_metadata` - for existence of the case (e.g.
-     *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-     *   * `translation_dataset_metadata:*` --> The dataset has
-     *                                          translation_dataset_metadata.
-     * 
- * - * string filter = 3; - * - * @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_; - /** - * - * - *
-     * Requested page size. Server may return fewer results than requested.
-     * If unspecified, server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Requested page size. Server may return fewer results than requested.
-     * If unspecified, server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Requested page size. Server may return fewer results than requested.
-     * If unspecified, server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-     * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-     * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-     * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-     * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-     * 
- * - * string page_token = 6; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-     * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ListDatasetsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListDatasetsRequest) - private static final com.google.cloud.automl.v1beta1.ListDatasetsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListDatasetsRequest(); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDatasetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDatasetsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequestOrBuilder.java deleted file mode 100644 index e39a8aead..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsRequestOrBuilder.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListDatasetsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListDatasetsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the project from which to list datasets.
-   * 
- * - * - * 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 project from which to list datasets.
-   * 
- * - * - * 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.
-   *   * `dataset_metadata` - for existence of the case (e.g.
-   *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-   *   * `translation_dataset_metadata:*` --> The dataset has
-   *                                          translation_dataset_metadata.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `dataset_metadata` - for existence of the case (e.g.
-   *             image_classification_dataset_metadata:*). Some examples of using the filter are:
-   *   * `translation_dataset_metadata:*` --> The dataset has
-   *                                          translation_dataset_metadata.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Requested page size. Server may return fewer results than requested.
-   * If unspecified, server will pick a default size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-   * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous
-   * [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponse.java deleted file mode 100644 index 6cf7f70e7..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponse.java +++ /dev/null @@ -1,1128 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListDatasetsResponse} - */ -public final class ListDatasetsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - datasets_ = java.util.Collections.unmodifiableList(datasets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListDatasetsResponse.class, - com.google.cloud.automl.v1beta1.ListDatasetsResponse.Builder.class); - } - - public static final int DATASETS_FIELD_NUMBER = 1; - private java.util.List datasets_; - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public java.util.List getDatasetsList() { - return datasets_; - } - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public java.util.List - getDatasetsOrBuilderList() { - return datasets_; - } - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public int getDatasetsCount() { - return datasets_.size(); - } - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public com.google.cloud.automl.v1beta1.Dataset getDatasets(int index) { - return datasets_.get(index); - } - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetsOrBuilder(int index) { - return datasets_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < datasets_.size(); i++) { - output.writeMessage(1, datasets_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < datasets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, datasets_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListDatasetsResponse)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListDatasetsResponse other = - (com.google.cloud.automl.v1beta1.ListDatasetsResponse) obj; - - if (!getDatasetsList().equals(other.getDatasetsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getDatasetsCount() > 0) { - hash = (37 * hash) + DATASETS_FIELD_NUMBER; - hash = (53 * hash) + getDatasetsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ListDatasetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListDatasetsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListDatasetsResponse) - com.google.cloud.automl.v1beta1.ListDatasetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListDatasetsResponse.class, - com.google.cloud.automl.v1beta1.ListDatasetsResponse.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListDatasetsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDatasetsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (datasetsBuilder_ == null) { - datasets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - datasetsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListDatasetsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsResponse getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListDatasetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsResponse build() { - com.google.cloud.automl.v1beta1.ListDatasetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsResponse buildPartial() { - com.google.cloud.automl.v1beta1.ListDatasetsResponse result = - new com.google.cloud.automl.v1beta1.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.automl.v1beta1.ListDatasetsResponse) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListDatasetsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListDatasetsResponse other) { - if (other == com.google.cloud.automl.v1beta1.ListDatasetsResponse.getDefaultInstance()) - return this; - if (datasetsBuilder_ == null) { - if (!other.datasets_.isEmpty()) { - if (datasets_.isEmpty()) { - datasets_ = other.datasets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDatasetsIsMutable(); - datasets_.addAll(other.datasets_); - } - onChanged(); - } - } else { - if (!other.datasets_.isEmpty()) { - if (datasetsBuilder_.isEmpty()) { - datasetsBuilder_.dispose(); - datasetsBuilder_ = null; - datasets_ = other.datasets_; - bitField0_ = (bitField0_ & ~0x00000001); - datasetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getDatasetsFieldBuilder() - : null; - } else { - datasetsBuilder_.addAllMessages(other.datasets_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListDatasetsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListDatasetsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List datasets_ = - java.util.Collections.emptyList(); - - private void ensureDatasetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - datasets_ = new java.util.ArrayList(datasets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder> - datasetsBuilder_; - - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public java.util.List getDatasetsList() { - if (datasetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(datasets_); - } else { - return datasetsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public int getDatasetsCount() { - if (datasetsBuilder_ == null) { - return datasets_.size(); - } else { - return datasetsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public com.google.cloud.automl.v1beta1.Dataset getDatasets(int index) { - if (datasetsBuilder_ == null) { - return datasets_.get(index); - } else { - return datasetsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder setDatasets(int index, com.google.cloud.automl.v1beta1.Dataset value) { - if (datasetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDatasetsIsMutable(); - datasets_.set(index, value); - onChanged(); - } else { - datasetsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder setDatasets( - int index, com.google.cloud.automl.v1beta1.Dataset.Builder builderForValue) { - if (datasetsBuilder_ == null) { - ensureDatasetsIsMutable(); - datasets_.set(index, builderForValue.build()); - onChanged(); - } else { - datasetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder addDatasets(com.google.cloud.automl.v1beta1.Dataset value) { - if (datasetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDatasetsIsMutable(); - datasets_.add(value); - onChanged(); - } else { - datasetsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder addDatasets(int index, com.google.cloud.automl.v1beta1.Dataset value) { - if (datasetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDatasetsIsMutable(); - datasets_.add(index, value); - onChanged(); - } else { - datasetsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder addDatasets(com.google.cloud.automl.v1beta1.Dataset.Builder builderForValue) { - if (datasetsBuilder_ == null) { - ensureDatasetsIsMutable(); - datasets_.add(builderForValue.build()); - onChanged(); - } else { - datasetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder addDatasets( - int index, com.google.cloud.automl.v1beta1.Dataset.Builder builderForValue) { - if (datasetsBuilder_ == null) { - ensureDatasetsIsMutable(); - datasets_.add(index, builderForValue.build()); - onChanged(); - } else { - datasetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder addAllDatasets( - java.lang.Iterable values) { - if (datasetsBuilder_ == null) { - ensureDatasetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, datasets_); - onChanged(); - } else { - datasetsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder clearDatasets() { - if (datasetsBuilder_ == null) { - datasets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - datasetsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public Builder removeDatasets(int index) { - if (datasetsBuilder_ == null) { - ensureDatasetsIsMutable(); - datasets_.remove(index); - onChanged(); - } else { - datasetsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public com.google.cloud.automl.v1beta1.Dataset.Builder getDatasetsBuilder(int index) { - return getDatasetsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetsOrBuilder(int index) { - if (datasetsBuilder_ == null) { - return datasets_.get(index); - } else { - return datasetsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public java.util.List - getDatasetsOrBuilderList() { - if (datasetsBuilder_ != null) { - return datasetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(datasets_); - } - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public com.google.cloud.automl.v1beta1.Dataset.Builder addDatasetsBuilder() { - return getDatasetsFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance()); - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public com.google.cloud.automl.v1beta1.Dataset.Builder addDatasetsBuilder(int index) { - return getDatasetsFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance()); - } - /** - * - * - *
-     * The datasets read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - public java.util.List - getDatasetsBuilderList() { - return getDatasetsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder> - getDatasetsFieldBuilder() { - if (datasetsBuilder_ == null) { - datasetsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder>( - datasets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - datasets_ = null; - } - return datasetsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to retrieve next page of results.
-     * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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 [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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 [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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 [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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 [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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.automl.v1beta1.ListDatasetsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListDatasetsResponse) - private static final com.google.cloud.automl.v1beta1.ListDatasetsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListDatasetsResponse(); - } - - public static com.google.cloud.automl.v1beta1.ListDatasetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListDatasetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDatasetsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListDatasetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponseOrBuilder.java deleted file mode 100644 index 93dc2bd25..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListDatasetsResponseOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListDatasetsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListDatasetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - java.util.List getDatasetsList(); - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - com.google.cloud.automl.v1beta1.Dataset getDatasets(int index); - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - int getDatasetsCount(); - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - java.util.List - getDatasetsOrBuilderList(); - /** - * - * - *
-   * The datasets read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Dataset datasets = 1; - */ - com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetsOrBuilder(int index); - - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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 [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequest.java deleted file mode 100644 index 51269a141..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequest.java +++ /dev/null @@ -1,1175 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelEvaluationsRequest} - */ -public final class ListModelEvaluationsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.class, - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. Resource name of the model to list the model evaluations for.
-   * If modelId is set as "-", this will list model evaluations from across all
-   * models of the parent location.
-   * 
- * - * - * string parent = 1 [(.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) { - 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. Resource name of the model to list the model evaluations for.
-   * If modelId is set as "-", this will list model evaluations from across all
-   * models of the parent location.
-   * 
- * - * - * string parent = 1 [(.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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 3; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-   *                          the last.
-   * Some examples of using the filter are:
-   *   * `annotation_spec_id!=4` --> The model evaluation was done for
-   *                             annotation spec with ID different than 4.
-   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-   *                                aggregate of all annotation specs.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-   *                          the last.
-   * Some examples of using the filter are:
-   *   * `annotation_spec_id!=4` --> The model evaluation was done for
-   *                             annotation spec with ID different than 4.
-   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-   *                                aggregate of all annotation specs.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - * - * - *
-   * Requested page size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 6; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained via
-   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained via
-   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest other = - (com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelEvaluationsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListModelEvaluationsRequest) - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.class, - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest build() { - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest buildPartial() { - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest result = - new com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest other) { - if (other == com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Resource name of the model to list the model evaluations for.
-     * If modelId is set as "-", this will list model evaluations from across all
-     * models of the parent location.
-     * 
- * - * - * string parent = 1 [(.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. Resource name of the model to list the model evaluations for.
-     * If modelId is set as "-", this will list model evaluations from across all
-     * models of the parent location.
-     * 
- * - * - * string parent = 1 [(.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. Resource name of the model to list the model evaluations for.
-     * If modelId is set as "-", this will list model evaluations from across all
-     * models of the parent location.
-     * 
- * - * - * string parent = 1 [(.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. Resource name of the model to list the model evaluations for.
-     * If modelId is set as "-", this will list model evaluations from across all
-     * models of the parent location.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Resource name of the model to list the model evaluations for.
-     * If modelId is set as "-", this will list model evaluations from across all
-     * models of the parent location.
-     * 
- * - * - * string parent = 1 [(.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.
-     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-     *                          the last.
-     * Some examples of using the filter are:
-     *   * `annotation_spec_id!=4` --> The model evaluation was done for
-     *                             annotation spec with ID different than 4.
-     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-     *                                aggregate of all annotation specs.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-     *                          the last.
-     * Some examples of using the filter are:
-     *   * `annotation_spec_id!=4` --> The model evaluation was done for
-     *                             annotation spec with ID different than 4.
-     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-     *                                aggregate of all annotation specs.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-     *                          the last.
-     * Some examples of using the filter are:
-     *   * `annotation_spec_id!=4` --> The model evaluation was done for
-     *                             annotation spec with ID different than 4.
-     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-     *                                aggregate of all annotation specs.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-     *                          the last.
-     * Some examples of using the filter are:
-     *   * `annotation_spec_id!=4` --> The model evaluation was done for
-     *                             annotation spec with ID different than 4.
-     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-     *                                aggregate of all annotation specs.
-     * 
- * - * string filter = 3; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * An expression for filtering the results of the request.
-     *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-     *                          the last.
-     * Some examples of using the filter are:
-     *   * `annotation_spec_id!=4` --> The model evaluation was done for
-     *                             annotation spec with ID different than 4.
-     *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-     *                                aggregate of all annotation specs.
-     * 
- * - * string filter = 3; - * - * @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_; - /** - * - * - *
-     * Requested page size.
-     * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Requested page size.
-     * 
- * - * int32 page_size = 4; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Requested page size.
-     * 
- * - * int32 page_size = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained via
-     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained via
-     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained via
-     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained via
-     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-     * 
- * - * string page_token = 6; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained via
-     * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ListModelEvaluationsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListModelEvaluationsRequest) - private static final com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest(); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListModelEvaluationsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListModelEvaluationsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequestOrBuilder.java deleted file mode 100644 index f51b6851c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsRequestOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListModelEvaluationsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListModelEvaluationsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of the model to list the model evaluations for.
-   * If modelId is set as "-", this will list model evaluations from across all
-   * models of the parent location.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Resource name of the model to list the model evaluations for.
-   * If modelId is set as "-", this will list model evaluations from across all
-   * models of the parent location.
-   * 
- * - * - * string parent = 1 [(.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.
-   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-   *                          the last.
-   * Some examples of using the filter are:
-   *   * `annotation_spec_id!=4` --> The model evaluation was done for
-   *                             annotation spec with ID different than 4.
-   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-   *                                aggregate of all annotation specs.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `annotation_spec_id` - for =, !=  or existence. See example below for
-   *                          the last.
-   * Some examples of using the filter are:
-   *   * `annotation_spec_id!=4` --> The model evaluation was done for
-   *                             annotation spec with ID different than 4.
-   *   * `NOT annotation_spec_id:*` --> The model evaluation was done for
-   *                                aggregate of all annotation specs.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Requested page size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained via
-   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained via
-   * [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponse.java deleted file mode 100644 index dfcaa55a8..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponse.java +++ /dev/null @@ -1,1153 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelEvaluationsResponse} - */ -public final class ListModelEvaluationsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListModelEvaluationsResponse) - ListModelEvaluationsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListModelEvaluationsResponse.newBuilder() to construct. - private ListModelEvaluationsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListModelEvaluationsResponse() { - modelEvaluation_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @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)) { - modelEvaluation_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - modelEvaluation_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.ModelEvaluation.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - modelEvaluation_ = java.util.Collections.unmodifiableList(modelEvaluation_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.class, - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.Builder.class); - } - - public static final int MODEL_EVALUATION_FIELD_NUMBER = 1; - private java.util.List modelEvaluation_; - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public java.util.List getModelEvaluationList() { - return modelEvaluation_; - } - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public java.util.List - getModelEvaluationOrBuilderList() { - return modelEvaluation_; - } - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public int getModelEvaluationCount() { - return modelEvaluation_.size(); - } - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public com.google.cloud.automl.v1beta1.ModelEvaluation getModelEvaluation(int index) { - return modelEvaluation_.get(index); - } - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public com.google.cloud.automl.v1beta1.ModelEvaluationOrBuilder getModelEvaluationOrBuilder( - int index) { - return modelEvaluation_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < modelEvaluation_.size(); i++) { - output.writeMessage(1, modelEvaluation_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < modelEvaluation_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, modelEvaluation_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse other = - (com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse) obj; - - if (!getModelEvaluationList().equals(other.getModelEvaluationList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getModelEvaluationCount() > 0) { - hash = (37 * hash) + MODEL_EVALUATION_FIELD_NUMBER; - hash = (53 * hash) + getModelEvaluationList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelEvaluationsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListModelEvaluationsResponse) - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.class, - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getModelEvaluationFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (modelEvaluationBuilder_ == null) { - modelEvaluation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - modelEvaluationBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelEvaluationsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse build() { - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse buildPartial() { - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse result = - new com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse(this); - int from_bitField0_ = bitField0_; - if (modelEvaluationBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - modelEvaluation_ = java.util.Collections.unmodifiableList(modelEvaluation_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.modelEvaluation_ = modelEvaluation_; - } else { - result.modelEvaluation_ = modelEvaluationBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse other) { - if (other - == com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse.getDefaultInstance()) - return this; - if (modelEvaluationBuilder_ == null) { - if (!other.modelEvaluation_.isEmpty()) { - if (modelEvaluation_.isEmpty()) { - modelEvaluation_ = other.modelEvaluation_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureModelEvaluationIsMutable(); - modelEvaluation_.addAll(other.modelEvaluation_); - } - onChanged(); - } - } else { - if (!other.modelEvaluation_.isEmpty()) { - if (modelEvaluationBuilder_.isEmpty()) { - modelEvaluationBuilder_.dispose(); - modelEvaluationBuilder_ = null; - modelEvaluation_ = other.modelEvaluation_; - bitField0_ = (bitField0_ & ~0x00000001); - modelEvaluationBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getModelEvaluationFieldBuilder() - : null; - } else { - modelEvaluationBuilder_.addAllMessages(other.modelEvaluation_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List modelEvaluation_ = - java.util.Collections.emptyList(); - - private void ensureModelEvaluationIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - modelEvaluation_ = - new java.util.ArrayList( - modelEvaluation_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ModelEvaluation, - com.google.cloud.automl.v1beta1.ModelEvaluation.Builder, - com.google.cloud.automl.v1beta1.ModelEvaluationOrBuilder> - modelEvaluationBuilder_; - - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public java.util.List - getModelEvaluationList() { - if (modelEvaluationBuilder_ == null) { - return java.util.Collections.unmodifiableList(modelEvaluation_); - } else { - return modelEvaluationBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public int getModelEvaluationCount() { - if (modelEvaluationBuilder_ == null) { - return modelEvaluation_.size(); - } else { - return modelEvaluationBuilder_.getCount(); - } - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public com.google.cloud.automl.v1beta1.ModelEvaluation getModelEvaluation(int index) { - if (modelEvaluationBuilder_ == null) { - return modelEvaluation_.get(index); - } else { - return modelEvaluationBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder setModelEvaluation( - int index, com.google.cloud.automl.v1beta1.ModelEvaluation value) { - if (modelEvaluationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModelEvaluationIsMutable(); - modelEvaluation_.set(index, value); - onChanged(); - } else { - modelEvaluationBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder setModelEvaluation( - int index, com.google.cloud.automl.v1beta1.ModelEvaluation.Builder builderForValue) { - if (modelEvaluationBuilder_ == null) { - ensureModelEvaluationIsMutable(); - modelEvaluation_.set(index, builderForValue.build()); - onChanged(); - } else { - modelEvaluationBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder addModelEvaluation(com.google.cloud.automl.v1beta1.ModelEvaluation value) { - if (modelEvaluationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModelEvaluationIsMutable(); - modelEvaluation_.add(value); - onChanged(); - } else { - modelEvaluationBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder addModelEvaluation( - int index, com.google.cloud.automl.v1beta1.ModelEvaluation value) { - if (modelEvaluationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModelEvaluationIsMutable(); - modelEvaluation_.add(index, value); - onChanged(); - } else { - modelEvaluationBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder addModelEvaluation( - com.google.cloud.automl.v1beta1.ModelEvaluation.Builder builderForValue) { - if (modelEvaluationBuilder_ == null) { - ensureModelEvaluationIsMutable(); - modelEvaluation_.add(builderForValue.build()); - onChanged(); - } else { - modelEvaluationBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder addModelEvaluation( - int index, com.google.cloud.automl.v1beta1.ModelEvaluation.Builder builderForValue) { - if (modelEvaluationBuilder_ == null) { - ensureModelEvaluationIsMutable(); - modelEvaluation_.add(index, builderForValue.build()); - onChanged(); - } else { - modelEvaluationBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder addAllModelEvaluation( - java.lang.Iterable values) { - if (modelEvaluationBuilder_ == null) { - ensureModelEvaluationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, modelEvaluation_); - onChanged(); - } else { - modelEvaluationBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder clearModelEvaluation() { - if (modelEvaluationBuilder_ == null) { - modelEvaluation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - modelEvaluationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public Builder removeModelEvaluation(int index) { - if (modelEvaluationBuilder_ == null) { - ensureModelEvaluationIsMutable(); - modelEvaluation_.remove(index); - onChanged(); - } else { - modelEvaluationBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public com.google.cloud.automl.v1beta1.ModelEvaluation.Builder getModelEvaluationBuilder( - int index) { - return getModelEvaluationFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public com.google.cloud.automl.v1beta1.ModelEvaluationOrBuilder getModelEvaluationOrBuilder( - int index) { - if (modelEvaluationBuilder_ == null) { - return modelEvaluation_.get(index); - } else { - return modelEvaluationBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public java.util.List - getModelEvaluationOrBuilderList() { - if (modelEvaluationBuilder_ != null) { - return modelEvaluationBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(modelEvaluation_); - } - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public com.google.cloud.automl.v1beta1.ModelEvaluation.Builder addModelEvaluationBuilder() { - return getModelEvaluationFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.ModelEvaluation.getDefaultInstance()); - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public com.google.cloud.automl.v1beta1.ModelEvaluation.Builder addModelEvaluationBuilder( - int index) { - return getModelEvaluationFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.ModelEvaluation.getDefaultInstance()); - } - /** - * - * - *
-     * List of model evaluations in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - public java.util.List - getModelEvaluationBuilderList() { - return getModelEvaluationFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ModelEvaluation, - com.google.cloud.automl.v1beta1.ModelEvaluation.Builder, - com.google.cloud.automl.v1beta1.ModelEvaluationOrBuilder> - getModelEvaluationFieldBuilder() { - if (modelEvaluationBuilder_ == null) { - modelEvaluationBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ModelEvaluation, - com.google.cloud.automl.v1beta1.ModelEvaluation.Builder, - com.google.cloud.automl.v1beta1.ModelEvaluationOrBuilder>( - modelEvaluation_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - modelEvaluation_ = null; - } - return modelEvaluationBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to retrieve next page of results.
-     * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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 the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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 the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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 the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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 the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-     * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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.automl.v1beta1.ListModelEvaluationsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListModelEvaluationsResponse) - private static final com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse(); - } - - public static com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListModelEvaluationsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListModelEvaluationsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelEvaluationsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponseOrBuilder.java deleted file mode 100644 index a14c73e66..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelEvaluationsResponseOrBuilder.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListModelEvaluationsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListModelEvaluationsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - java.util.List getModelEvaluationList(); - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - com.google.cloud.automl.v1beta1.ModelEvaluation getModelEvaluation(int index); - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - int getModelEvaluationCount(); - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - java.util.List - getModelEvaluationOrBuilderList(); - /** - * - * - *
-   * List of model evaluations in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ModelEvaluation model_evaluation = 1; - */ - com.google.cloud.automl.v1beta1.ModelEvaluationOrBuilder getModelEvaluationOrBuilder(int index); - - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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 the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new
-   * [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequest.java deleted file mode 100644 index bc2b7abc3..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequest.java +++ /dev/null @@ -1,1153 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelsRequest} - */ -public final class ListModelsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListModelsRequest) - ListModelsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListModelsRequest.newBuilder() to construct. - private ListModelsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListModelsRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @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 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelsRequest.class, - com.google.cloud.automl.v1beta1.ListModelsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. Resource name of the project, from which to list the models.
-   * 
- * - * - * 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) { - 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. Resource name of the project, from which to list the models.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 3; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `model_metadata` - for existence of the case (e.g.
-   *             video_classification_model_metadata:*).
-   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-   *   * `image_classification_model_metadata:*` --> The model has
-   *                                        image_classification_model_metadata.
-   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `model_metadata` - for existence of the case (e.g.
-   *             video_classification_model_metadata:*).
-   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-   *   * `image_classification_model_metadata:*` --> The model has
-   *                                        image_classification_model_metadata.
-   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - * - * - *
-   * Requested page size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 6; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-   * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-   * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListModelsRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListModelsRequest other = - (com.google.cloud.automl.v1beta1.ListModelsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ListModelsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListModelsRequest) - com.google.cloud.automl.v1beta1.ListModelsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelsRequest.class, - com.google.cloud.automl.v1beta1.ListModelsRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListModelsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListModelsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsRequest build() { - com.google.cloud.automl.v1beta1.ListModelsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsRequest buildPartial() { - com.google.cloud.automl.v1beta1.ListModelsRequest result = - new com.google.cloud.automl.v1beta1.ListModelsRequest(this); - result.parent_ = parent_; - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ListModelsRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListModelsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListModelsRequest other) { - if (other == com.google.cloud.automl.v1beta1.ListModelsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListModelsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListModelsRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Resource name of the project, from which to list the models.
-     * 
- * - * - * 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. Resource name of the project, from which to list the models.
-     * 
- * - * - * 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. Resource name of the project, from which to list the models.
-     * 
- * - * - * 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. Resource name of the project, from which to list the models.
-     * 
- * - * - * 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. Resource name of the project, from which to list the models.
-     * 
- * - * - * 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.
-     *   * `model_metadata` - for existence of the case (e.g.
-     *             video_classification_model_metadata:*).
-     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-     *   * `image_classification_model_metadata:*` --> The model has
-     *                                        image_classification_model_metadata.
-     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `model_metadata` - for existence of the case (e.g.
-     *             video_classification_model_metadata:*).
-     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-     *   * `image_classification_model_metadata:*` --> The model has
-     *                                        image_classification_model_metadata.
-     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `model_metadata` - for existence of the case (e.g.
-     *             video_classification_model_metadata:*).
-     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-     *   * `image_classification_model_metadata:*` --> The model has
-     *                                        image_classification_model_metadata.
-     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-     * 
- * - * string filter = 3; - * - * @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.
-     *   * `model_metadata` - for existence of the case (e.g.
-     *             video_classification_model_metadata:*).
-     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-     *   * `image_classification_model_metadata:*` --> The model has
-     *                                        image_classification_model_metadata.
-     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-     * 
- * - * string filter = 3; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * An expression for filtering the results of the request.
-     *   * `model_metadata` - for existence of the case (e.g.
-     *             video_classification_model_metadata:*).
-     *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-     *   * `image_classification_model_metadata:*` --> The model has
-     *                                        image_classification_model_metadata.
-     *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-     * 
- * - * string filter = 3; - * - * @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_; - /** - * - * - *
-     * Requested page size.
-     * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Requested page size.
-     * 
- * - * int32 page_size = 4; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Requested page size.
-     * 
- * - * int32 page_size = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-     * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-     * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-     * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-     * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-     * 
- * - * string page_token = 6; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return
-     * Typically obtained via
-     * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-     * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ListModelsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListModelsRequest) - private static final com.google.cloud.automl.v1beta1.ListModelsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListModelsRequest(); - } - - public static com.google.cloud.automl.v1beta1.ListModelsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListModelsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListModelsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequestOrBuilder.java deleted file mode 100644 index 873c691f9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsRequestOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListModelsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListModelsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of the project, from which to list the models.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Resource name of the project, from which to list the models.
-   * 
- * - * - * 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.
-   *   * `model_metadata` - for existence of the case (e.g.
-   *             video_classification_model_metadata:*).
-   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-   *   * `image_classification_model_metadata:*` --> The model has
-   *                                        image_classification_model_metadata.
-   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * An expression for filtering the results of the request.
-   *   * `model_metadata` - for existence of the case (e.g.
-   *             video_classification_model_metadata:*).
-   *   * `dataset_id` - for = or !=. Some examples of using the filter are:
-   *   * `image_classification_model_metadata:*` --> The model has
-   *                                        image_classification_model_metadata.
-   *   * `dataset_id=5` --> The model was created from a dataset with ID 5.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Requested page size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-   * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A token identifying a page of results for the server to return
-   * Typically obtained via
-   * [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous
-   * [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponse.java deleted file mode 100644 index 8f9488067..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponse.java +++ /dev/null @@ -1,1127 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelsResponse} - */ -public final class ListModelsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListModelsResponse) - ListModelsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListModelsResponse.newBuilder() to construct. - private ListModelsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListModelsResponse() { - model_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @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)) { - model_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - model_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.Model.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - model_ = java.util.Collections.unmodifiableList(model_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelsResponse.class, - com.google.cloud.automl.v1beta1.ListModelsResponse.Builder.class); - } - - public static final int MODEL_FIELD_NUMBER = 1; - private java.util.List model_; - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public java.util.List getModelList() { - return model_; - } - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public java.util.List - getModelOrBuilderList() { - return model_; - } - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public int getModelCount() { - return model_.size(); - } - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public com.google.cloud.automl.v1beta1.Model getModel(int index) { - return model_.get(index); - } - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public com.google.cloud.automl.v1beta1.ModelOrBuilder getModelOrBuilder(int index) { - return model_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.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) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < model_.size(); i++) { - output.writeMessage(1, model_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < model_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, model_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListModelsResponse)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListModelsResponse other = - (com.google.cloud.automl.v1beta1.ListModelsResponse) obj; - - if (!getModelList().equals(other.getModelList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getModelCount() > 0) { - hash = (37 * hash) + MODEL_FIELD_NUMBER; - hash = (53 * hash) + getModelList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ListModelsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListModelsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListModelsResponse) - com.google.cloud.automl.v1beta1.ListModelsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListModelsResponse.class, - com.google.cloud.automl.v1beta1.ListModelsResponse.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListModelsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getModelFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (modelBuilder_ == null) { - model_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - modelBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListModelsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsResponse getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListModelsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsResponse build() { - com.google.cloud.automl.v1beta1.ListModelsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsResponse buildPartial() { - com.google.cloud.automl.v1beta1.ListModelsResponse result = - new com.google.cloud.automl.v1beta1.ListModelsResponse(this); - int from_bitField0_ = bitField0_; - if (modelBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - model_ = java.util.Collections.unmodifiableList(model_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.model_ = model_; - } else { - result.model_ = modelBuilder_.build(); - } - result.nextPageToken_ = nextPageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ListModelsResponse) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListModelsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListModelsResponse other) { - if (other == com.google.cloud.automl.v1beta1.ListModelsResponse.getDefaultInstance()) - return this; - if (modelBuilder_ == null) { - if (!other.model_.isEmpty()) { - if (model_.isEmpty()) { - model_ = other.model_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureModelIsMutable(); - model_.addAll(other.model_); - } - onChanged(); - } - } else { - if (!other.model_.isEmpty()) { - if (modelBuilder_.isEmpty()) { - modelBuilder_.dispose(); - modelBuilder_ = null; - model_ = other.model_; - bitField0_ = (bitField0_ & ~0x00000001); - modelBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getModelFieldBuilder() - : null; - } else { - modelBuilder_.addAllMessages(other.model_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListModelsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListModelsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List model_ = - java.util.Collections.emptyList(); - - private void ensureModelIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - model_ = new java.util.ArrayList(model_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Model, - com.google.cloud.automl.v1beta1.Model.Builder, - com.google.cloud.automl.v1beta1.ModelOrBuilder> - modelBuilder_; - - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public java.util.List getModelList() { - if (modelBuilder_ == null) { - return java.util.Collections.unmodifiableList(model_); - } else { - return modelBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public int getModelCount() { - if (modelBuilder_ == null) { - return model_.size(); - } else { - return modelBuilder_.getCount(); - } - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public com.google.cloud.automl.v1beta1.Model getModel(int index) { - if (modelBuilder_ == null) { - return model_.get(index); - } else { - return modelBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder setModel(int index, com.google.cloud.automl.v1beta1.Model value) { - if (modelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModelIsMutable(); - model_.set(index, value); - onChanged(); - } else { - modelBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder setModel( - int index, com.google.cloud.automl.v1beta1.Model.Builder builderForValue) { - if (modelBuilder_ == null) { - ensureModelIsMutable(); - model_.set(index, builderForValue.build()); - onChanged(); - } else { - modelBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder addModel(com.google.cloud.automl.v1beta1.Model value) { - if (modelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModelIsMutable(); - model_.add(value); - onChanged(); - } else { - modelBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder addModel(int index, com.google.cloud.automl.v1beta1.Model value) { - if (modelBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureModelIsMutable(); - model_.add(index, value); - onChanged(); - } else { - modelBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder addModel(com.google.cloud.automl.v1beta1.Model.Builder builderForValue) { - if (modelBuilder_ == null) { - ensureModelIsMutable(); - model_.add(builderForValue.build()); - onChanged(); - } else { - modelBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder addModel( - int index, com.google.cloud.automl.v1beta1.Model.Builder builderForValue) { - if (modelBuilder_ == null) { - ensureModelIsMutable(); - model_.add(index, builderForValue.build()); - onChanged(); - } else { - modelBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder addAllModel( - java.lang.Iterable values) { - if (modelBuilder_ == null) { - ensureModelIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, model_); - onChanged(); - } else { - modelBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder clearModel() { - if (modelBuilder_ == null) { - model_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - modelBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public Builder removeModel(int index) { - if (modelBuilder_ == null) { - ensureModelIsMutable(); - model_.remove(index); - onChanged(); - } else { - modelBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public com.google.cloud.automl.v1beta1.Model.Builder getModelBuilder(int index) { - return getModelFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public com.google.cloud.automl.v1beta1.ModelOrBuilder getModelOrBuilder(int index) { - if (modelBuilder_ == null) { - return model_.get(index); - } else { - return modelBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public java.util.List - getModelOrBuilderList() { - if (modelBuilder_ != null) { - return modelBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(model_); - } - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public com.google.cloud.automl.v1beta1.Model.Builder addModelBuilder() { - return getModelFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.Model.getDefaultInstance()); - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public com.google.cloud.automl.v1beta1.Model.Builder addModelBuilder(int index) { - return getModelFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.Model.getDefaultInstance()); - } - /** - * - * - *
-     * List of models in the requested page.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - public java.util.List getModelBuilderList() { - return getModelFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Model, - com.google.cloud.automl.v1beta1.Model.Builder, - com.google.cloud.automl.v1beta1.ModelOrBuilder> - getModelFieldBuilder() { - if (modelBuilder_ == null) { - modelBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.Model, - com.google.cloud.automl.v1beta1.Model.Builder, - com.google.cloud.automl.v1beta1.ModelOrBuilder>( - model_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - model_ = null; - } - return modelBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to retrieve next page of results.
-     * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.ListModelsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListModelsResponse) - private static final com.google.cloud.automl.v1beta1.ListModelsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListModelsResponse(); - } - - public static com.google.cloud.automl.v1beta1.ListModelsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListModelsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListModelsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListModelsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponseOrBuilder.java deleted file mode 100644 index a3caedf68..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListModelsResponseOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListModelsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListModelsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - java.util.List getModelList(); - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - com.google.cloud.automl.v1beta1.Model getModel(int index); - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - int getModelCount(); - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - java.util.List getModelOrBuilderList(); - /** - * - * - *
-   * List of models in the requested page.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.Model model = 1; - */ - com.google.cloud.automl.v1beta1.ModelOrBuilder getModelOrBuilder(int index); - - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.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.automl.v1beta1.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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequest.java deleted file mode 100644 index 1b5526138..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequest.java +++ /dev/null @@ -1,1381 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListTableSpecsRequest} - */ -public final class ListTableSpecsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListTableSpecsRequest) - ListTableSpecsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListTableSpecsRequest.newBuilder() to construct. - private ListTableSpecsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListTableSpecsRequest() { - parent_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTableSpecsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListTableSpecsRequest( - 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.protobuf.FieldMask.Builder subBuilder = null; - if (fieldMask_ != null) { - subBuilder = fieldMask_.toBuilder(); - } - fieldMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fieldMask_); - fieldMask_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 32: - { - pageSize_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListTableSpecsRequest.class, - com.google.cloud.automl.v1beta1.ListTableSpecsRequest.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 table specs from.
-   * 
- * - * - * 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) { - 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 table specs from.
-   * 
- * - * - * 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 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 FIELD_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask fieldMask_; - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMask_ != null; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - return getFieldMask(); - } - - public static final int FILTER_FIELD_NUMBER = 3; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - 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; - } - } - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - * - * - *
-   * Requested page size. The server can return fewer results than requested.
-   * If unspecified, the server will pick a default size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 6; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (fieldMask_ != null) { - output.writeMessage(2, getFieldMask()); - } - if (!getFilterBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getParentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (fieldMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getFieldMask()); - } - if (!getFilterBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - if (!getPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListTableSpecsRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListTableSpecsRequest other = - (com.google.cloud.automl.v1beta1.ListTableSpecsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasFieldMask() != other.hasFieldMask()) return false; - if (hasFieldMask()) { - if (!getFieldMask().equals(other.getFieldMask())) return false; - } - if (!getFilter().equals(other.getFilter())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasFieldMask()) { - hash = (37 * hash) + FIELD_MASK_FIELD_NUMBER; - hash = (53 * hash) + getFieldMask().hashCode(); - } - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ListTableSpecsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListTableSpecsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListTableSpecsRequest) - com.google.cloud.automl.v1beta1.ListTableSpecsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListTableSpecsRequest.class, - com.google.cloud.automl.v1beta1.ListTableSpecsRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListTableSpecsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (fieldMaskBuilder_ == null) { - fieldMask_ = null; - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - filter_ = ""; - - pageSize_ = 0; - - pageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListTableSpecsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsRequest build() { - com.google.cloud.automl.v1beta1.ListTableSpecsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsRequest buildPartial() { - com.google.cloud.automl.v1beta1.ListTableSpecsRequest result = - new com.google.cloud.automl.v1beta1.ListTableSpecsRequest(this); - result.parent_ = parent_; - if (fieldMaskBuilder_ == null) { - result.fieldMask_ = fieldMask_; - } else { - result.fieldMask_ = fieldMaskBuilder_.build(); - } - result.filter_ = filter_; - result.pageSize_ = pageSize_; - result.pageToken_ = pageToken_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ListTableSpecsRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListTableSpecsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListTableSpecsRequest other) { - if (other == com.google.cloud.automl.v1beta1.ListTableSpecsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (other.hasFieldMask()) { - mergeFieldMask(other.getFieldMask()); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListTableSpecsRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListTableSpecsRequest) 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 table specs from.
-     * 
- * - * - * 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 table specs from.
-     * 
- * - * - * 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 table specs from.
-     * 
- * - * - * 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 table specs from.
-     * 
- * - * - * 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 table specs from.
-     * 
- * - * - * 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.protobuf.FieldMask fieldMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - fieldMaskBuilder_; - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - public boolean hasFieldMask() { - return fieldMaskBuilder_ != null || fieldMask_ != null; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - public com.google.protobuf.FieldMask getFieldMask() { - if (fieldMaskBuilder_ == null) { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } else { - return fieldMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - fieldMask_ = value; - onChanged(); - } else { - fieldMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder setFieldMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (fieldMaskBuilder_ == null) { - fieldMask_ = builderForValue.build(); - onChanged(); - } else { - fieldMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder mergeFieldMask(com.google.protobuf.FieldMask value) { - if (fieldMaskBuilder_ == null) { - if (fieldMask_ != null) { - fieldMask_ = - com.google.protobuf.FieldMask.newBuilder(fieldMask_).mergeFrom(value).buildPartial(); - } else { - fieldMask_ = value; - } - onChanged(); - } else { - fieldMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public Builder clearFieldMask() { - if (fieldMaskBuilder_ == null) { - fieldMask_ = null; - onChanged(); - } else { - fieldMask_ = null; - fieldMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getFieldMaskBuilder() { - - onChanged(); - return getFieldMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder() { - if (fieldMaskBuilder_ != null) { - return fieldMaskBuilder_.getMessageOrBuilder(); - } else { - return fieldMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : fieldMask_; - } - } - /** - * - * - *
-     * Mask specifying which fields to read.
-     * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getFieldMaskFieldBuilder() { - if (fieldMaskBuilder_ == null) { - fieldMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getFieldMask(), getParentForChildren(), isClean()); - fieldMask_ = null; - } - return fieldMaskBuilder_; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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; - } - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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; - } - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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; - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * Filter expression, see go/filtering.
-     * 
- * - * string filter = 3; - * - * @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_; - /** - * - * - *
-     * Requested page size. The server can return fewer results than requested.
-     * If unspecified, the server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Requested page size. The server can return fewer results than requested.
-     * If unspecified, the server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Requested page size. The server can return fewer results than requested.
-     * If unspecified, the server will pick a default size.
-     * 
- * - * int32 page_size = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token identifying a page of results for the server to return.
-     * Typically obtained from the
-     * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-     * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-     * 
- * - * string page_token = 6; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ListTableSpecsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListTableSpecsRequest) - private static final com.google.cloud.automl.v1beta1.ListTableSpecsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListTableSpecsRequest(); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListTableSpecsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTableSpecsRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequestOrBuilder.java deleted file mode 100644 index f98028520..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsRequestOrBuilder.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListTableSpecsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListTableSpecsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the dataset to list table specs from.
-   * 
- * - * - * 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 table specs from.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return Whether the fieldMask field is set. - */ - boolean hasFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - * - * @return The fieldMask. - */ - com.google.protobuf.FieldMask getFieldMask(); - /** - * - * - *
-   * Mask specifying which fields to read.
-   * 
- * - * .google.protobuf.FieldMask field_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getFieldMaskOrBuilder(); - - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Filter expression, see go/filtering.
-   * 
- * - * string filter = 3; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * Requested page size. The server can return fewer results than requested.
-   * If unspecified, the server will pick a default size.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A token identifying a page of results for the server to return.
-   * Typically obtained from the
-   * [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous
-   * [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call.
-   * 
- * - * string page_token = 6; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponse.java deleted file mode 100644 index cdc428272..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponse.java +++ /dev/null @@ -1,1131 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListTableSpecsResponse} - */ -public final class ListTableSpecsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ListTableSpecsResponse) - ListTableSpecsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListTableSpecsResponse.newBuilder() to construct. - private ListTableSpecsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListTableSpecsResponse() { - tableSpecs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListTableSpecsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListTableSpecsResponse( - 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)) { - tableSpecs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - tableSpecs_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.TableSpec.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)) { - tableSpecs_ = java.util.Collections.unmodifiableList(tableSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListTableSpecsResponse.class, - com.google.cloud.automl.v1beta1.ListTableSpecsResponse.Builder.class); - } - - public static final int TABLE_SPECS_FIELD_NUMBER = 1; - private java.util.List tableSpecs_; - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public java.util.List getTableSpecsList() { - return tableSpecs_; - } - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public java.util.List - getTableSpecsOrBuilderList() { - return tableSpecs_; - } - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public int getTableSpecsCount() { - return tableSpecs_.size(); - } - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public com.google.cloud.automl.v1beta1.TableSpec getTableSpecs(int index) { - return tableSpecs_.get(index); - } - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public com.google.cloud.automl.v1beta1.TableSpecOrBuilder getTableSpecsOrBuilder(int index) { - return tableSpecs_.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 [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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) { - 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 [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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 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 < tableSpecs_.size(); i++) { - output.writeMessage(1, tableSpecs_.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 < tableSpecs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tableSpecs_.get(i)); - } - if (!getNextPageTokenBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ListTableSpecsResponse)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ListTableSpecsResponse other = - (com.google.cloud.automl.v1beta1.ListTableSpecsResponse) obj; - - if (!getTableSpecsList().equals(other.getTableSpecsList())) 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 (getTableSpecsCount() > 0) { - hash = (37 * hash) + TABLE_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getTableSpecsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ListTableSpecsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ListTableSpecsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ListTableSpecsResponse) - com.google.cloud.automl.v1beta1.ListTableSpecsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ListTableSpecsResponse.class, - com.google.cloud.automl.v1beta1.ListTableSpecsResponse.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ListTableSpecsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTableSpecsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (tableSpecsBuilder_ == null) { - tableSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - tableSpecsBuilder_.clear(); - } - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_ListTableSpecsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsResponse getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ListTableSpecsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsResponse build() { - com.google.cloud.automl.v1beta1.ListTableSpecsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsResponse buildPartial() { - com.google.cloud.automl.v1beta1.ListTableSpecsResponse result = - new com.google.cloud.automl.v1beta1.ListTableSpecsResponse(this); - int from_bitField0_ = bitField0_; - if (tableSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - tableSpecs_ = java.util.Collections.unmodifiableList(tableSpecs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tableSpecs_ = tableSpecs_; - } else { - result.tableSpecs_ = tableSpecsBuilder_.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.automl.v1beta1.ListTableSpecsResponse) { - return mergeFrom((com.google.cloud.automl.v1beta1.ListTableSpecsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ListTableSpecsResponse other) { - if (other == com.google.cloud.automl.v1beta1.ListTableSpecsResponse.getDefaultInstance()) - return this; - if (tableSpecsBuilder_ == null) { - if (!other.tableSpecs_.isEmpty()) { - if (tableSpecs_.isEmpty()) { - tableSpecs_ = other.tableSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTableSpecsIsMutable(); - tableSpecs_.addAll(other.tableSpecs_); - } - onChanged(); - } - } else { - if (!other.tableSpecs_.isEmpty()) { - if (tableSpecsBuilder_.isEmpty()) { - tableSpecsBuilder_.dispose(); - tableSpecsBuilder_ = null; - tableSpecs_ = other.tableSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - tableSpecsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTableSpecsFieldBuilder() - : null; - } else { - tableSpecsBuilder_.addAllMessages(other.tableSpecs_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ListTableSpecsResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ListTableSpecsResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List tableSpecs_ = - java.util.Collections.emptyList(); - - private void ensureTableSpecsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - tableSpecs_ = - new java.util.ArrayList(tableSpecs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TableSpec, - com.google.cloud.automl.v1beta1.TableSpec.Builder, - com.google.cloud.automl.v1beta1.TableSpecOrBuilder> - tableSpecsBuilder_; - - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public java.util.List getTableSpecsList() { - if (tableSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tableSpecs_); - } else { - return tableSpecsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public int getTableSpecsCount() { - if (tableSpecsBuilder_ == null) { - return tableSpecs_.size(); - } else { - return tableSpecsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public com.google.cloud.automl.v1beta1.TableSpec getTableSpecs(int index) { - if (tableSpecsBuilder_ == null) { - return tableSpecs_.get(index); - } else { - return tableSpecsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder setTableSpecs(int index, com.google.cloud.automl.v1beta1.TableSpec value) { - if (tableSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableSpecsIsMutable(); - tableSpecs_.set(index, value); - onChanged(); - } else { - tableSpecsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder setTableSpecs( - int index, com.google.cloud.automl.v1beta1.TableSpec.Builder builderForValue) { - if (tableSpecsBuilder_ == null) { - ensureTableSpecsIsMutable(); - tableSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - tableSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder addTableSpecs(com.google.cloud.automl.v1beta1.TableSpec value) { - if (tableSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableSpecsIsMutable(); - tableSpecs_.add(value); - onChanged(); - } else { - tableSpecsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder addTableSpecs(int index, com.google.cloud.automl.v1beta1.TableSpec value) { - if (tableSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTableSpecsIsMutable(); - tableSpecs_.add(index, value); - onChanged(); - } else { - tableSpecsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder addTableSpecs( - com.google.cloud.automl.v1beta1.TableSpec.Builder builderForValue) { - if (tableSpecsBuilder_ == null) { - ensureTableSpecsIsMutable(); - tableSpecs_.add(builderForValue.build()); - onChanged(); - } else { - tableSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder addTableSpecs( - int index, com.google.cloud.automl.v1beta1.TableSpec.Builder builderForValue) { - if (tableSpecsBuilder_ == null) { - ensureTableSpecsIsMutable(); - tableSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - tableSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder addAllTableSpecs( - java.lang.Iterable values) { - if (tableSpecsBuilder_ == null) { - ensureTableSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tableSpecs_); - onChanged(); - } else { - tableSpecsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder clearTableSpecs() { - if (tableSpecsBuilder_ == null) { - tableSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tableSpecsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public Builder removeTableSpecs(int index) { - if (tableSpecsBuilder_ == null) { - ensureTableSpecsIsMutable(); - tableSpecs_.remove(index); - onChanged(); - } else { - tableSpecsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public com.google.cloud.automl.v1beta1.TableSpec.Builder getTableSpecsBuilder(int index) { - return getTableSpecsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public com.google.cloud.automl.v1beta1.TableSpecOrBuilder getTableSpecsOrBuilder(int index) { - if (tableSpecsBuilder_ == null) { - return tableSpecs_.get(index); - } else { - return tableSpecsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public java.util.List - getTableSpecsOrBuilderList() { - if (tableSpecsBuilder_ != null) { - return tableSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tableSpecs_); - } - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public com.google.cloud.automl.v1beta1.TableSpec.Builder addTableSpecsBuilder() { - return getTableSpecsFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance()); - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public com.google.cloud.automl.v1beta1.TableSpec.Builder addTableSpecsBuilder(int index) { - return getTableSpecsFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance()); - } - /** - * - * - *
-     * The table specs read.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - public java.util.List - getTableSpecsBuilderList() { - return getTableSpecsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TableSpec, - com.google.cloud.automl.v1beta1.TableSpec.Builder, - com.google.cloud.automl.v1beta1.TableSpecOrBuilder> - getTableSpecsFieldBuilder() { - if (tableSpecsBuilder_ == null) { - tableSpecsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TableSpec, - com.google.cloud.automl.v1beta1.TableSpec.Builder, - com.google.cloud.automl.v1beta1.TableSpecOrBuilder>( - tableSpecs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - tableSpecs_ = null; - } - return tableSpecsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to retrieve next page of results.
-     * Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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 [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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 [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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 [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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 [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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.automl.v1beta1.ListTableSpecsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ListTableSpecsResponse) - private static final com.google.cloud.automl.v1beta1.ListTableSpecsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ListTableSpecsResponse(); - } - - public static com.google.cloud.automl.v1beta1.ListTableSpecsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListTableSpecsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTableSpecsResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ListTableSpecsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponseOrBuilder.java deleted file mode 100644 index 7b79bad7b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ListTableSpecsResponseOrBuilder.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface ListTableSpecsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ListTableSpecsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - java.util.List getTableSpecsList(); - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - com.google.cloud.automl.v1beta1.TableSpec getTableSpecs(int index); - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - int getTableSpecsCount(); - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - java.util.List - getTableSpecsOrBuilderList(); - /** - * - * - *
-   * The table specs read.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TableSpec table_specs = 1; - */ - com.google.cloud.automl.v1beta1.TableSpecOrBuilder getTableSpecsOrBuilder(int index); - - /** - * - * - *
-   * A token to retrieve next page of results.
-   * Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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 [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/LocationName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/LocationName.java deleted file mode 100644 index 0adf75f67..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/LocationName.java +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.automl.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class LocationName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private LocationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - } - - public static LocationName of(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build(); - } - - public static String format(String project, String location) { - return newBuilder().setProject(project).setLocation(location).build().toString(); - } - - public static LocationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "LocationName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (LocationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location); - } - - /** Builder for LocationName. */ - public static class Builder { - - private String project; - private String location; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - private Builder() {} - - private Builder(LocationName locationName) { - project = locationName.project; - location = locationName.location; - } - - public LocationName build() { - return new LocationName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof LocationName) { - LocationName that = (LocationName) o; - return (this.project.equals(that.project)) && (this.location.equals(that.location)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Model.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Model.java deleted file mode 100644 index 1ddba45eb..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Model.java +++ /dev/null @@ -1,4997 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/model.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * API proto representing a trained machine learning model.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Model} - */ -public final class Model extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Model) - ModelOrBuilder { - private static final long serialVersionUID = 0L; - // Use Model.newBuilder() to construct. - private Model(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Model() { - name_ = ""; - displayName_ = ""; - datasetId_ = ""; - deploymentState_ = 0; - } - - @java.lang.Override - @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(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - datasetId_ = s; - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 64: - { - int rawValue = input.readEnum(); - - deploymentState_ = rawValue; - break; - } - case 90: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder subBuilder = - null; - if (modelMetadataCase_ == 13) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 13; - break; - } - case 114: - { - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder subBuilder = - null; - if (modelMetadataCase_ == 14) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) - modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) - modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 14; - break; - } - case 122: - { - com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder subBuilder = null; - if (modelMetadataCase_ == 15) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TranslationModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 15; - break; - } - case 154: - { - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder subBuilder = null; - if (modelMetadataCase_ == 19) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 19; - break; - } - case 162: - { - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder subBuilder = - null; - if (modelMetadataCase_ == 20) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 20; - break; - } - case 170: - { - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder subBuilder = - null; - if (modelMetadataCase_ == 21) { - subBuilder = - ((com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 21; - break; - } - case 178: - { - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder subBuilder = null; - if (modelMetadataCase_ == 22) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 22; - break; - } - case 186: - { - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder subBuilder = - null; - if (modelMetadataCase_ == 23) { - subBuilder = - ((com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 23; - break; - } - case 194: - { - com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder subBuilder = null; - if (modelMetadataCase_ == 24) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_) - .toBuilder(); - } - modelMetadata_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TablesModelMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_); - modelMetadata_ = subBuilder.buildPartial(); - } - modelMetadataCase_ = 24; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ModelOuterClass - .internal_static_google_cloud_automl_v1beta1_Model_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ModelOuterClass - .internal_static_google_cloud_automl_v1beta1_Model_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Model.class, - com.google.cloud.automl.v1beta1.Model.Builder.class); - } - - /** - * - * - *
-   * Deployment state of the model.
-   * 
- * - * Protobuf enum {@code google.cloud.automl.v1beta1.Model.DeploymentState} - */ - public enum DeploymentState implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Should not be used, an un-set enum has this value by default.
-     * 
- * - * DEPLOYMENT_STATE_UNSPECIFIED = 0; - */ - DEPLOYMENT_STATE_UNSPECIFIED(0), - /** - * - * - *
-     * Model is deployed.
-     * 
- * - * DEPLOYED = 1; - */ - DEPLOYED(1), - /** - * - * - *
-     * Model is not deployed.
-     * 
- * - * UNDEPLOYED = 2; - */ - UNDEPLOYED(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Should not be used, an un-set enum has this value by default.
-     * 
- * - * DEPLOYMENT_STATE_UNSPECIFIED = 0; - */ - public static final int DEPLOYMENT_STATE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Model is deployed.
-     * 
- * - * DEPLOYED = 1; - */ - public static final int DEPLOYED_VALUE = 1; - /** - * - * - *
-     * Model is not deployed.
-     * 
- * - * UNDEPLOYED = 2; - */ - public static final int UNDEPLOYED_VALUE = 2; - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @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 DeploymentState 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 DeploymentState forNumber(int value) { - switch (value) { - case 0: - return DEPLOYMENT_STATE_UNSPECIFIED; - case 1: - return DEPLOYED; - case 2: - return UNDEPLOYED; - default: - return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { - return internalValueMap; - } - - private static final com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public DeploymentState findValueByNumber(int number) { - return DeploymentState.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Model.getDescriptor().getEnumTypes().get(0); - } - - private static final DeploymentState[] VALUES = values(); - - public static DeploymentState valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private DeploymentState(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.automl.v1beta1.Model.DeploymentState) - } - - private int modelMetadataCase_ = 0; - private java.lang.Object modelMetadata_; - - public enum ModelMetadataCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TRANSLATION_MODEL_METADATA(15), - IMAGE_CLASSIFICATION_MODEL_METADATA(13), - TEXT_CLASSIFICATION_MODEL_METADATA(14), - IMAGE_OBJECT_DETECTION_MODEL_METADATA(20), - VIDEO_CLASSIFICATION_MODEL_METADATA(23), - VIDEO_OBJECT_TRACKING_MODEL_METADATA(21), - TEXT_EXTRACTION_MODEL_METADATA(19), - TABLES_MODEL_METADATA(24), - TEXT_SENTIMENT_MODEL_METADATA(22), - MODELMETADATA_NOT_SET(0); - private final int value; - - private ModelMetadataCase(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 ModelMetadataCase valueOf(int value) { - return forNumber(value); - } - - public static ModelMetadataCase forNumber(int value) { - switch (value) { - case 15: - return TRANSLATION_MODEL_METADATA; - case 13: - return IMAGE_CLASSIFICATION_MODEL_METADATA; - case 14: - return TEXT_CLASSIFICATION_MODEL_METADATA; - case 20: - return IMAGE_OBJECT_DETECTION_MODEL_METADATA; - case 23: - return VIDEO_CLASSIFICATION_MODEL_METADATA; - case 21: - return VIDEO_OBJECT_TRACKING_MODEL_METADATA; - case 19: - return TEXT_EXTRACTION_MODEL_METADATA; - case 24: - return TABLES_MODEL_METADATA; - case 22: - return TEXT_SENTIMENT_MODEL_METADATA; - case 0: - return MODELMETADATA_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public ModelMetadataCase getModelMetadataCase() { - return ModelMetadataCase.forNumber(modelMetadataCase_); - } - - public static final int TRANSLATION_MODEL_METADATA_FIELD_NUMBER = 15; - /** - * - * - *
-   * Metadata for translation models.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - * - * @return Whether the translationModelMetadata field is set. - */ - public boolean hasTranslationModelMetadata() { - return modelMetadataCase_ == 15; - } - /** - * - * - *
-   * Metadata for translation models.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - * - * @return The translationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TranslationModelMetadata getTranslationModelMetadata() { - if (modelMetadataCase_ == 15) { - return (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for translation models.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - public com.google.cloud.automl.v1beta1.TranslationModelMetadataOrBuilder - getTranslationModelMetadataOrBuilder() { - if (modelMetadataCase_ == 15) { - return (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance(); - } - - public static final int IMAGE_CLASSIFICATION_MODEL_METADATA_FIELD_NUMBER = 13; - /** - * - * - *
-   * Metadata for image classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - * - * @return Whether the imageClassificationModelMetadata field is set. - */ - public boolean hasImageClassificationModelMetadata() { - return modelMetadataCase_ == 13; - } - /** - * - * - *
-   * Metadata for image classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - * - * @return The imageClassificationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - getImageClassificationModelMetadata() { - if (modelMetadataCase_ == 13) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for image classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadataOrBuilder - getImageClassificationModelMetadataOrBuilder() { - if (modelMetadataCase_ == 13) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.getDefaultInstance(); - } - - public static final int TEXT_CLASSIFICATION_MODEL_METADATA_FIELD_NUMBER = 14; - /** - * - * - *
-   * Metadata for text classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - * - * @return Whether the textClassificationModelMetadata field is set. - */ - public boolean hasTextClassificationModelMetadata() { - return modelMetadataCase_ == 14; - } - /** - * - * - *
-   * Metadata for text classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - * - * @return The textClassificationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - getTextClassificationModelMetadata() { - if (modelMetadataCase_ == 14) { - return (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for text classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadataOrBuilder - getTextClassificationModelMetadataOrBuilder() { - if (modelMetadataCase_ == 14) { - return (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance(); - } - - public static final int IMAGE_OBJECT_DETECTION_MODEL_METADATA_FIELD_NUMBER = 20; - /** - * - * - *
-   * Metadata for image object detection models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - * - * @return Whether the imageObjectDetectionModelMetadata field is set. - */ - public boolean hasImageObjectDetectionModelMetadata() { - return modelMetadataCase_ == 20; - } - /** - * - * - *
-   * Metadata for image object detection models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - * - * @return The imageObjectDetectionModelMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - getImageObjectDetectionModelMetadata() { - if (modelMetadataCase_ == 20) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for image object detection models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataOrBuilder - getImageObjectDetectionModelMetadataOrBuilder() { - if (modelMetadataCase_ == 20) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.getDefaultInstance(); - } - - public static final int VIDEO_CLASSIFICATION_MODEL_METADATA_FIELD_NUMBER = 23; - /** - * - * - *
-   * Metadata for video classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - * - * @return Whether the videoClassificationModelMetadata field is set. - */ - public boolean hasVideoClassificationModelMetadata() { - return modelMetadataCase_ == 23; - } - /** - * - * - *
-   * Metadata for video classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - * - * @return The videoClassificationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - getVideoClassificationModelMetadata() { - if (modelMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for video classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadataOrBuilder - getVideoClassificationModelMetadataOrBuilder() { - if (modelMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.getDefaultInstance(); - } - - public static final int VIDEO_OBJECT_TRACKING_MODEL_METADATA_FIELD_NUMBER = 21; - /** - * - * - *
-   * Metadata for video object tracking models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - * - * @return Whether the videoObjectTrackingModelMetadata field is set. - */ - public boolean hasVideoObjectTrackingModelMetadata() { - return modelMetadataCase_ == 21; - } - /** - * - * - *
-   * Metadata for video object tracking models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - * - * @return The videoObjectTrackingModelMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - getVideoObjectTrackingModelMetadata() { - if (modelMetadataCase_ == 21) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for video object tracking models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataOrBuilder - getVideoObjectTrackingModelMetadataOrBuilder() { - if (modelMetadataCase_ == 21) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.getDefaultInstance(); - } - - public static final int TEXT_EXTRACTION_MODEL_METADATA_FIELD_NUMBER = 19; - /** - * - * - *
-   * Metadata for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - * - * @return Whether the textExtractionModelMetadata field is set. - */ - public boolean hasTextExtractionModelMetadata() { - return modelMetadataCase_ == 19; - } - /** - * - * - *
-   * Metadata for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - * - * @return The textExtractionModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadata - getTextExtractionModelMetadata() { - if (modelMetadataCase_ == 19) { - return (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadataOrBuilder - getTextExtractionModelMetadataOrBuilder() { - if (modelMetadataCase_ == 19) { - return (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance(); - } - - public static final int TABLES_MODEL_METADATA_FIELD_NUMBER = 24; - /** - * - * - *
-   * Metadata for Tables models.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - * - * @return Whether the tablesModelMetadata field is set. - */ - public boolean hasTablesModelMetadata() { - return modelMetadataCase_ == 24; - } - /** - * - * - *
-   * Metadata for Tables models.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - * - * @return The tablesModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TablesModelMetadata getTablesModelMetadata() { - if (modelMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for Tables models.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - public com.google.cloud.automl.v1beta1.TablesModelMetadataOrBuilder - getTablesModelMetadataOrBuilder() { - if (modelMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance(); - } - - public static final int TEXT_SENTIMENT_MODEL_METADATA_FIELD_NUMBER = 22; - /** - * - * - *
-   * Metadata for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - * - * @return Whether the textSentimentModelMetadata field is set. - */ - public boolean hasTextSentimentModelMetadata() { - return modelMetadataCase_ == 22; - } - /** - * - * - *
-   * Metadata for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - * - * @return The textSentimentModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadata - getTextSentimentModelMetadata() { - if (modelMetadataCase_ == 22) { - return (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Metadata for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadataOrBuilder - getTextSentimentModelMetadataOrBuilder() { - if (modelMetadataCase_ == 22) { - return (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. Resource name of the model.
-   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Resource name of the model.
-   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Required. The name of the model to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9. It must start with a letter.
-   * 
- * - * string display_name = 2; - * - * @return The displayName. - */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The name of the model to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9. It must start with a letter.
-   * 
- * - * string display_name = 2; - * - * @return The bytes for displayName. - */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATASET_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object datasetId_; - /** - * - * - *
-   * Required. The resource ID of the dataset used to create the model. The dataset must
-   * come from the same ancestor project and location.
-   * 
- * - * string dataset_id = 3; - * - * @return The datasetId. - */ - public java.lang.String getDatasetId() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - datasetId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The resource ID of the dataset used to create the model. The dataset must
-   * come from the same ancestor project and location.
-   * 
- * - * string dataset_id = 3; - * - * @return The bytes for datasetId. - */ - public com.google.protobuf.ByteString getDatasetIdBytes() { - java.lang.Object ref = datasetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - datasetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. Timestamp when the model training finished  and can be used for prediction.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. Timestamp when the model training finished  and can be used for prediction.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. Timestamp when the model training finished  and can be used for prediction.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 11; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. Timestamp when this model was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. Timestamp when this model was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. Timestamp when this model was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - public static final int DEPLOYMENT_STATE_FIELD_NUMBER = 8; - private int deploymentState_; - /** - * - * - *
-   * Output only. Deployment state of the model. A model can only serve
-   * prediction requests after it gets deployed.
-   * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @return The enum numeric value on the wire for deploymentState. - */ - public int getDeploymentStateValue() { - return deploymentState_; - } - /** - * - * - *
-   * Output only. Deployment state of the model. A model can only serve
-   * prediction requests after it gets deployed.
-   * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @return The deploymentState. - */ - public com.google.cloud.automl.v1beta1.Model.DeploymentState getDeploymentState() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.Model.DeploymentState result = - com.google.cloud.automl.v1beta1.Model.DeploymentState.valueOf(deploymentState_); - return result == null - ? com.google.cloud.automl.v1beta1.Model.DeploymentState.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 (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); - } - if (!getDatasetIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, datasetId_); - } - if (createTime_ != null) { - output.writeMessage(7, getCreateTime()); - } - if (deploymentState_ - != com.google.cloud.automl.v1beta1.Model.DeploymentState.DEPLOYMENT_STATE_UNSPECIFIED - .getNumber()) { - output.writeEnum(8, deploymentState_); - } - if (updateTime_ != null) { - output.writeMessage(11, getUpdateTime()); - } - if (modelMetadataCase_ == 13) { - output.writeMessage( - 13, (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 14) { - output.writeMessage( - 14, (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 15) { - output.writeMessage( - 15, (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 19) { - output.writeMessage( - 19, (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 20) { - output.writeMessage( - 20, (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 21) { - output.writeMessage( - 21, (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 22) { - output.writeMessage( - 22, (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 23) { - output.writeMessage( - 23, (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 24) { - output.writeMessage(24, (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); - } - if (!getDatasetIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, datasetId_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); - } - if (deploymentState_ - != com.google.cloud.automl.v1beta1.Model.DeploymentState.DEPLOYMENT_STATE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, deploymentState_); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getUpdateTime()); - } - if (modelMetadataCase_ == 13) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 13, - (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 14) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 14, (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 15) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 15, (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 19) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 19, (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 20) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 20, - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 21) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 21, - (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 22) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 22, (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 23) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 23, - (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) modelMetadata_); - } - if (modelMetadataCase_ == 24) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 24, (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.Model)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Model other = (com.google.cloud.automl.v1beta1.Model) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDisplayName().equals(other.getDisplayName())) return false; - if (!getDatasetId().equals(other.getDatasetId())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (deploymentState_ != other.deploymentState_) return false; - if (!getModelMetadataCase().equals(other.getModelMetadataCase())) return false; - switch (modelMetadataCase_) { - case 15: - if (!getTranslationModelMetadata().equals(other.getTranslationModelMetadata())) - return false; - break; - case 13: - if (!getImageClassificationModelMetadata() - .equals(other.getImageClassificationModelMetadata())) return false; - break; - case 14: - if (!getTextClassificationModelMetadata() - .equals(other.getTextClassificationModelMetadata())) return false; - break; - case 20: - if (!getImageObjectDetectionModelMetadata() - .equals(other.getImageObjectDetectionModelMetadata())) return false; - break; - case 23: - if (!getVideoClassificationModelMetadata() - .equals(other.getVideoClassificationModelMetadata())) return false; - break; - case 21: - if (!getVideoObjectTrackingModelMetadata() - .equals(other.getVideoObjectTrackingModelMetadata())) return false; - break; - case 19: - if (!getTextExtractionModelMetadata().equals(other.getTextExtractionModelMetadata())) - return false; - break; - case 24: - if (!getTablesModelMetadata().equals(other.getTablesModelMetadata())) return false; - break; - case 22: - if (!getTextSentimentModelMetadata().equals(other.getTextSentimentModelMetadata())) - return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getDisplayName().hashCode(); - hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; - hash = (53 * hash) + getDatasetId().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + DEPLOYMENT_STATE_FIELD_NUMBER; - hash = (53 * hash) + deploymentState_; - switch (modelMetadataCase_) { - case 15: - hash = (37 * hash) + TRANSLATION_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTranslationModelMetadata().hashCode(); - break; - case 13: - hash = (37 * hash) + IMAGE_CLASSIFICATION_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getImageClassificationModelMetadata().hashCode(); - break; - case 14: - hash = (37 * hash) + TEXT_CLASSIFICATION_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTextClassificationModelMetadata().hashCode(); - break; - case 20: - hash = (37 * hash) + IMAGE_OBJECT_DETECTION_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getImageObjectDetectionModelMetadata().hashCode(); - break; - case 23: - hash = (37 * hash) + VIDEO_CLASSIFICATION_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getVideoClassificationModelMetadata().hashCode(); - break; - case 21: - hash = (37 * hash) + VIDEO_OBJECT_TRACKING_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getVideoObjectTrackingModelMetadata().hashCode(); - break; - case 19: - hash = (37 * hash) + TEXT_EXTRACTION_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTextExtractionModelMetadata().hashCode(); - break; - case 24: - hash = (37 * hash) + TABLES_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTablesModelMetadata().hashCode(); - break; - case 22: - hash = (37 * hash) + TEXT_SENTIMENT_MODEL_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getTextSentimentModelMetadata().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Model parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Model parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Model parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.Model prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * API proto representing a trained machine learning model.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Model} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Model) - com.google.cloud.automl.v1beta1.ModelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ModelOuterClass - .internal_static_google_cloud_automl_v1beta1_Model_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ModelOuterClass - .internal_static_google_cloud_automl_v1beta1_Model_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Model.class, - com.google.cloud.automl.v1beta1.Model.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Model.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - displayName_ = ""; - - datasetId_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - deploymentState_ = 0; - - modelMetadataCase_ = 0; - modelMetadata_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ModelOuterClass - .internal_static_google_cloud_automl_v1beta1_Model_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Model getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Model.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Model build() { - com.google.cloud.automl.v1beta1.Model result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Model buildPartial() { - com.google.cloud.automl.v1beta1.Model result = - new com.google.cloud.automl.v1beta1.Model(this); - if (modelMetadataCase_ == 15) { - if (translationModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = translationModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 13) { - if (imageClassificationModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = imageClassificationModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 14) { - if (textClassificationModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = textClassificationModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 20) { - if (imageObjectDetectionModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = imageObjectDetectionModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 23) { - if (videoClassificationModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = videoClassificationModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 21) { - if (videoObjectTrackingModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = videoObjectTrackingModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 19) { - if (textExtractionModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = textExtractionModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 24) { - if (tablesModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = tablesModelMetadataBuilder_.build(); - } - } - if (modelMetadataCase_ == 22) { - if (textSentimentModelMetadataBuilder_ == null) { - result.modelMetadata_ = modelMetadata_; - } else { - result.modelMetadata_ = textSentimentModelMetadataBuilder_.build(); - } - } - result.name_ = name_; - result.displayName_ = displayName_; - result.datasetId_ = datasetId_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.deploymentState_ = deploymentState_; - result.modelMetadataCase_ = modelMetadataCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Model) { - return mergeFrom((com.google.cloud.automl.v1beta1.Model) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Model other) { - if (other == com.google.cloud.automl.v1beta1.Model.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (!other.getDatasetId().isEmpty()) { - datasetId_ = other.datasetId_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (other.deploymentState_ != 0) { - setDeploymentStateValue(other.getDeploymentStateValue()); - } - switch (other.getModelMetadataCase()) { - case TRANSLATION_MODEL_METADATA: - { - mergeTranslationModelMetadata(other.getTranslationModelMetadata()); - break; - } - case IMAGE_CLASSIFICATION_MODEL_METADATA: - { - mergeImageClassificationModelMetadata(other.getImageClassificationModelMetadata()); - break; - } - case TEXT_CLASSIFICATION_MODEL_METADATA: - { - mergeTextClassificationModelMetadata(other.getTextClassificationModelMetadata()); - break; - } - case IMAGE_OBJECT_DETECTION_MODEL_METADATA: - { - mergeImageObjectDetectionModelMetadata(other.getImageObjectDetectionModelMetadata()); - break; - } - case VIDEO_CLASSIFICATION_MODEL_METADATA: - { - mergeVideoClassificationModelMetadata(other.getVideoClassificationModelMetadata()); - break; - } - case VIDEO_OBJECT_TRACKING_MODEL_METADATA: - { - mergeVideoObjectTrackingModelMetadata(other.getVideoObjectTrackingModelMetadata()); - break; - } - case TEXT_EXTRACTION_MODEL_METADATA: - { - mergeTextExtractionModelMetadata(other.getTextExtractionModelMetadata()); - break; - } - case TABLES_MODEL_METADATA: - { - mergeTablesModelMetadata(other.getTablesModelMetadata()); - break; - } - case TEXT_SENTIMENT_MODEL_METADATA: - { - mergeTextSentimentModelMetadata(other.getTextSentimentModelMetadata()); - break; - } - case MODELMETADATA_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Model parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.Model) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int modelMetadataCase_ = 0; - private java.lang.Object modelMetadata_; - - public ModelMetadataCase getModelMetadataCase() { - return ModelMetadataCase.forNumber(modelMetadataCase_); - } - - public Builder clearModelMetadata() { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationModelMetadata, - com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TranslationModelMetadataOrBuilder> - translationModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - * - * @return Whether the translationModelMetadata field is set. - */ - public boolean hasTranslationModelMetadata() { - return modelMetadataCase_ == 15; - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - * - * @return The translationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TranslationModelMetadata getTranslationModelMetadata() { - if (translationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 15) { - return (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance(); - } else { - if (modelMetadataCase_ == 15) { - return translationModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - public Builder setTranslationModelMetadata( - com.google.cloud.automl.v1beta1.TranslationModelMetadata value) { - if (translationModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - translationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 15; - return this; - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - public Builder setTranslationModelMetadata( - com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder builderForValue) { - if (translationModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - translationModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 15; - return this; - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - public Builder mergeTranslationModelMetadata( - com.google.cloud.automl.v1beta1.TranslationModelMetadata value) { - if (translationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 15 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TranslationModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 15) { - translationModelMetadataBuilder_.mergeFrom(value); - } - translationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 15; - return this; - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - public Builder clearTranslationModelMetadata() { - if (translationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 15) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 15) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - translationModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - public com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder - getTranslationModelMetadataBuilder() { - return getTranslationModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - public com.google.cloud.automl.v1beta1.TranslationModelMetadataOrBuilder - getTranslationModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 15) && (translationModelMetadataBuilder_ != null)) { - return translationModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 15) { - return (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for translation models.
-     * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationModelMetadata, - com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TranslationModelMetadataOrBuilder> - getTranslationModelMetadataFieldBuilder() { - if (translationModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 15)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance(); - } - translationModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationModelMetadata, - com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TranslationModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TranslationModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 15; - onChanged(); - ; - return translationModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadataOrBuilder> - imageClassificationModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - * - * @return Whether the imageClassificationModelMetadata field is set. - */ - public boolean hasImageClassificationModelMetadata() { - return modelMetadataCase_ == 13; - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - * - * @return The imageClassificationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - getImageClassificationModelMetadata() { - if (imageClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 13) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - .getDefaultInstance(); - } else { - if (modelMetadataCase_ == 13) { - return imageClassificationModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - public Builder setImageClassificationModelMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata value) { - if (imageClassificationModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - imageClassificationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 13; - return this; - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - public Builder setImageClassificationModelMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder builderForValue) { - if (imageClassificationModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - imageClassificationModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 13; - return this; - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - public Builder mergeImageClassificationModelMetadata( - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata value) { - if (imageClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 13 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - .getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) - modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 13) { - imageClassificationModelMetadataBuilder_.mergeFrom(value); - } - imageClassificationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 13; - return this; - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - public Builder clearImageClassificationModelMetadata() { - if (imageClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 13) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 13) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - imageClassificationModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder - getImageClassificationModelMetadataBuilder() { - return getImageClassificationModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - public com.google.cloud.automl.v1beta1.ImageClassificationModelMetadataOrBuilder - getImageClassificationModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 13) && (imageClassificationModelMetadataBuilder_ != null)) { - return imageClassificationModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 13) { - return (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for image classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadataOrBuilder> - getImageClassificationModelMetadataFieldBuilder() { - if (imageClassificationModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 13)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.getDefaultInstance(); - } - imageClassificationModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 13; - onChanged(); - ; - return imageClassificationModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadataOrBuilder> - textClassificationModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - * - * @return Whether the textClassificationModelMetadata field is set. - */ - public boolean hasTextClassificationModelMetadata() { - return modelMetadataCase_ == 14; - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - * - * @return The textClassificationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - getTextClassificationModelMetadata() { - if (textClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 14) { - return (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance(); - } else { - if (modelMetadataCase_ == 14) { - return textClassificationModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - public Builder setTextClassificationModelMetadata( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata value) { - if (textClassificationModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - textClassificationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 14; - return this; - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - public Builder setTextClassificationModelMetadata( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder builderForValue) { - if (textClassificationModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - textClassificationModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 14; - return this; - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - public Builder mergeTextClassificationModelMetadata( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata value) { - if (textClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 14 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - .getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) - modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 14) { - textClassificationModelMetadataBuilder_.mergeFrom(value); - } - textClassificationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 14; - return this; - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - public Builder clearTextClassificationModelMetadata() { - if (textClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 14) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 14) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - textClassificationModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder - getTextClassificationModelMetadataBuilder() { - return getTextClassificationModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadataOrBuilder - getTextClassificationModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 14) && (textClassificationModelMetadataBuilder_ != null)) { - return textClassificationModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 14) { - return (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for text classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadataOrBuilder> - getTextClassificationModelMetadataFieldBuilder() { - if (textClassificationModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 14)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance(); - } - textClassificationModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 14; - onChanged(); - ; - return textClassificationModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataOrBuilder> - imageObjectDetectionModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - * - * @return Whether the imageObjectDetectionModelMetadata field is set. - */ - public boolean hasImageObjectDetectionModelMetadata() { - return modelMetadataCase_ == 20; - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - * - * @return The imageObjectDetectionModelMetadata. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - getImageObjectDetectionModelMetadata() { - if (imageObjectDetectionModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 20) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - .getDefaultInstance(); - } else { - if (modelMetadataCase_ == 20) { - return imageObjectDetectionModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - public Builder setImageObjectDetectionModelMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata value) { - if (imageObjectDetectionModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - imageObjectDetectionModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 20; - return this; - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - public Builder setImageObjectDetectionModelMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder builderForValue) { - if (imageObjectDetectionModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - imageObjectDetectionModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 20; - return this; - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - public Builder mergeImageObjectDetectionModelMetadata( - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata value) { - if (imageObjectDetectionModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 20 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - .getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) - modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 20) { - imageObjectDetectionModelMetadataBuilder_.mergeFrom(value); - } - imageObjectDetectionModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 20; - return this; - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - public Builder clearImageObjectDetectionModelMetadata() { - if (imageObjectDetectionModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 20) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 20) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - imageObjectDetectionModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder - getImageObjectDetectionModelMetadataBuilder() { - return getImageObjectDetectionModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataOrBuilder - getImageObjectDetectionModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 20) && (imageObjectDetectionModelMetadataBuilder_ != null)) { - return imageObjectDetectionModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 20) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for image object detection models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataOrBuilder> - getImageObjectDetectionModelMetadataFieldBuilder() { - if (imageObjectDetectionModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 20)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - .getDefaultInstance(); - } - imageObjectDetectionModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 20; - onChanged(); - ; - return imageObjectDetectionModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadataOrBuilder> - videoClassificationModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - * - * @return Whether the videoClassificationModelMetadata field is set. - */ - public boolean hasVideoClassificationModelMetadata() { - return modelMetadataCase_ == 23; - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - * - * @return The videoClassificationModelMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - getVideoClassificationModelMetadata() { - if (videoClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - .getDefaultInstance(); - } else { - if (modelMetadataCase_ == 23) { - return videoClassificationModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - public Builder setVideoClassificationModelMetadata( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata value) { - if (videoClassificationModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - videoClassificationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 23; - return this; - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - public Builder setVideoClassificationModelMetadata( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder builderForValue) { - if (videoClassificationModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - videoClassificationModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 23; - return this; - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - public Builder mergeVideoClassificationModelMetadata( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata value) { - if (videoClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 23 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - .getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 23) { - videoClassificationModelMetadataBuilder_.mergeFrom(value); - } - videoClassificationModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 23; - return this; - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - public Builder clearVideoClassificationModelMetadata() { - if (videoClassificationModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 23) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 23) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - videoClassificationModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder - getVideoClassificationModelMetadataBuilder() { - return getVideoClassificationModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadataOrBuilder - getVideoClassificationModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 23) && (videoClassificationModelMetadataBuilder_ != null)) { - return videoClassificationModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 23) { - return (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for video classification models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadataOrBuilder> - getVideoClassificationModelMetadataFieldBuilder() { - if (videoClassificationModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 23)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.getDefaultInstance(); - } - videoClassificationModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 23; - onChanged(); - ; - return videoClassificationModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataOrBuilder> - videoObjectTrackingModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - * - * @return Whether the videoObjectTrackingModelMetadata field is set. - */ - public boolean hasVideoObjectTrackingModelMetadata() { - return modelMetadataCase_ == 21; - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - * - * @return The videoObjectTrackingModelMetadata. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - getVideoObjectTrackingModelMetadata() { - if (videoObjectTrackingModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 21) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - .getDefaultInstance(); - } else { - if (modelMetadataCase_ == 21) { - return videoObjectTrackingModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - public Builder setVideoObjectTrackingModelMetadata( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata value) { - if (videoObjectTrackingModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - videoObjectTrackingModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 21; - return this; - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - public Builder setVideoObjectTrackingModelMetadata( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder builderForValue) { - if (videoObjectTrackingModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - videoObjectTrackingModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 21; - return this; - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - public Builder mergeVideoObjectTrackingModelMetadata( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata value) { - if (videoObjectTrackingModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 21 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - .getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 21) { - videoObjectTrackingModelMetadataBuilder_.mergeFrom(value); - } - videoObjectTrackingModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 21; - return this; - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - public Builder clearVideoObjectTrackingModelMetadata() { - if (videoObjectTrackingModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 21) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 21) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - videoObjectTrackingModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder - getVideoObjectTrackingModelMetadataBuilder() { - return getVideoObjectTrackingModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataOrBuilder - getVideoObjectTrackingModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 21) && (videoObjectTrackingModelMetadataBuilder_ != null)) { - return videoObjectTrackingModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 21) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for video object tracking models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataOrBuilder> - getVideoObjectTrackingModelMetadataFieldBuilder() { - if (videoObjectTrackingModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 21)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.getDefaultInstance(); - } - videoObjectTrackingModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 21; - onChanged(); - ; - return videoObjectTrackingModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadataOrBuilder> - textExtractionModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - * - * @return Whether the textExtractionModelMetadata field is set. - */ - public boolean hasTextExtractionModelMetadata() { - return modelMetadataCase_ == 19; - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - * - * @return The textExtractionModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadata - getTextExtractionModelMetadata() { - if (textExtractionModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 19) { - return (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance(); - } else { - if (modelMetadataCase_ == 19) { - return textExtractionModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - public Builder setTextExtractionModelMetadata( - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata value) { - if (textExtractionModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - textExtractionModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 19; - return this; - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - public Builder setTextExtractionModelMetadata( - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder builderForValue) { - if (textExtractionModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - textExtractionModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 19; - return this; - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - public Builder mergeTextExtractionModelMetadata( - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata value) { - if (textExtractionModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 19 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.TextExtractionModelMetadata - .getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 19) { - textExtractionModelMetadataBuilder_.mergeFrom(value); - } - textExtractionModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 19; - return this; - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - public Builder clearTextExtractionModelMetadata() { - if (textExtractionModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 19) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 19) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - textExtractionModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder - getTextExtractionModelMetadataBuilder() { - return getTextExtractionModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadataOrBuilder - getTextExtractionModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 19) && (textExtractionModelMetadataBuilder_ != null)) { - return textExtractionModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 19) { - return (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadataOrBuilder> - getTextExtractionModelMetadataFieldBuilder() { - if (textExtractionModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 19)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance(); - } - textExtractionModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 19; - onChanged(); - ; - return textExtractionModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelMetadata, - com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TablesModelMetadataOrBuilder> - tablesModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - * - * @return Whether the tablesModelMetadata field is set. - */ - public boolean hasTablesModelMetadata() { - return modelMetadataCase_ == 24; - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - * - * @return The tablesModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TablesModelMetadata getTablesModelMetadata() { - if (tablesModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance(); - } else { - if (modelMetadataCase_ == 24) { - return tablesModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - public Builder setTablesModelMetadata( - com.google.cloud.automl.v1beta1.TablesModelMetadata value) { - if (tablesModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - tablesModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 24; - return this; - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - public Builder setTablesModelMetadata( - com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder builderForValue) { - if (tablesModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - tablesModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 24; - return this; - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - public Builder mergeTablesModelMetadata( - com.google.cloud.automl.v1beta1.TablesModelMetadata value) { - if (tablesModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 24 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TablesModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 24) { - tablesModelMetadataBuilder_.mergeFrom(value); - } - tablesModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 24; - return this; - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - public Builder clearTablesModelMetadata() { - if (tablesModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 24) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 24) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - tablesModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - public com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder - getTablesModelMetadataBuilder() { - return getTablesModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - public com.google.cloud.automl.v1beta1.TablesModelMetadataOrBuilder - getTablesModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 24) && (tablesModelMetadataBuilder_ != null)) { - return tablesModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 24) { - return (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for Tables models.
-     * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelMetadata, - com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TablesModelMetadataOrBuilder> - getTablesModelMetadataFieldBuilder() { - if (tablesModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 24)) { - modelMetadata_ = com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance(); - } - tablesModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelMetadata, - com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TablesModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TablesModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 24; - onChanged(); - ; - return tablesModelMetadataBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadataOrBuilder> - textSentimentModelMetadataBuilder_; - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - * - * @return Whether the textSentimentModelMetadata field is set. - */ - public boolean hasTextSentimentModelMetadata() { - return modelMetadataCase_ == 22; - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - * - * @return The textSentimentModelMetadata. - */ - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadata - getTextSentimentModelMetadata() { - if (textSentimentModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 22) { - return (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance(); - } else { - if (modelMetadataCase_ == 22) { - return textSentimentModelMetadataBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - public Builder setTextSentimentModelMetadata( - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata value) { - if (textSentimentModelMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - modelMetadata_ = value; - onChanged(); - } else { - textSentimentModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 22; - return this; - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - public Builder setTextSentimentModelMetadata( - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder builderForValue) { - if (textSentimentModelMetadataBuilder_ == null) { - modelMetadata_ = builderForValue.build(); - onChanged(); - } else { - textSentimentModelMetadataBuilder_.setMessage(builderForValue.build()); - } - modelMetadataCase_ = 22; - return this; - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - public Builder mergeTextSentimentModelMetadata( - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata value) { - if (textSentimentModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 22 - && modelMetadata_ - != com.google.cloud.automl.v1beta1.TextSentimentModelMetadata - .getDefaultInstance()) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_) - .mergeFrom(value) - .buildPartial(); - } else { - modelMetadata_ = value; - } - onChanged(); - } else { - if (modelMetadataCase_ == 22) { - textSentimentModelMetadataBuilder_.mergeFrom(value); - } - textSentimentModelMetadataBuilder_.setMessage(value); - } - modelMetadataCase_ = 22; - return this; - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - public Builder clearTextSentimentModelMetadata() { - if (textSentimentModelMetadataBuilder_ == null) { - if (modelMetadataCase_ == 22) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - onChanged(); - } - } else { - if (modelMetadataCase_ == 22) { - modelMetadataCase_ = 0; - modelMetadata_ = null; - } - textSentimentModelMetadataBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder - getTextSentimentModelMetadataBuilder() { - return getTextSentimentModelMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadataOrBuilder - getTextSentimentModelMetadataOrBuilder() { - if ((modelMetadataCase_ == 22) && (textSentimentModelMetadataBuilder_ != null)) { - return textSentimentModelMetadataBuilder_.getMessageOrBuilder(); - } else { - if (modelMetadataCase_ == 22) { - return (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_; - } - return com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Metadata for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadataOrBuilder> - getTextSentimentModelMetadataFieldBuilder() { - if (textSentimentModelMetadataBuilder_ == null) { - if (!(modelMetadataCase_ == 22)) { - modelMetadata_ = - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance(); - } - textSentimentModelMetadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) modelMetadata_, - getParentForChildren(), - isClean()); - modelMetadata_ = null; - } - modelMetadataCase_ = 22; - onChanged(); - ; - return textSentimentModelMetadataBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. Resource name of the model.
-     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string name = 1; - * - * @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 model.
-     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. Resource name of the model.
-     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * 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; - } - /** - * - * - *
-     * Output only. Resource name of the model.
-     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Resource name of the model.
-     * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string name = 1; - * - * @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 name of the model to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9. It must start with a letter.
-     * 
- * - * string display_name = 2; - * - * @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 name of the model to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9. It must start with a letter.
-     * 
- * - * string display_name = 2; - * - * @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 name of the model to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9. It must start with a letter.
-     * 
- * - * string display_name = 2; - * - * @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 name of the model to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9. It must start with a letter.
-     * 
- * - * string display_name = 2; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The name of the model to show in the interface. The name can be
-     * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-     * and a-z, underscores
-     * (_), and ASCII digits 0-9. It must start with a letter.
-     * 
- * - * string display_name = 2; - * - * @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 datasetId_ = ""; - /** - * - * - *
-     * Required. The resource ID of the dataset used to create the model. The dataset must
-     * come from the same ancestor project and location.
-     * 
- * - * string dataset_id = 3; - * - * @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 resource ID of the dataset used to create the model. The dataset must
-     * come from the same ancestor project and location.
-     * 
- * - * string dataset_id = 3; - * - * @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 resource ID of the dataset used to create the model. The dataset must
-     * come from the same ancestor project and location.
-     * 
- * - * string dataset_id = 3; - * - * @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 resource ID of the dataset used to create the model. The dataset must
-     * come from the same ancestor project and location.
-     * 
- * - * string dataset_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearDatasetId() { - - datasetId_ = getDefaultInstance().getDatasetId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource ID of the dataset used to create the model. The dataset must
-     * come from the same ancestor project and location.
-     * 
- * - * string dataset_id = 3; - * - * @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 com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @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 model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. Timestamp when the model training finished  and can be used for prediction.
-     * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - * - * @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 last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. Timestamp when this model was last updated.
-     * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private int deploymentState_ = 0; - /** - * - * - *
-     * Output only. Deployment state of the model. A model can only serve
-     * prediction requests after it gets deployed.
-     * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @return The enum numeric value on the wire for deploymentState. - */ - public int getDeploymentStateValue() { - return deploymentState_; - } - /** - * - * - *
-     * Output only. Deployment state of the model. A model can only serve
-     * prediction requests after it gets deployed.
-     * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @param value The enum numeric value on the wire for deploymentState to set. - * @return This builder for chaining. - */ - public Builder setDeploymentStateValue(int value) { - deploymentState_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Deployment state of the model. A model can only serve
-     * prediction requests after it gets deployed.
-     * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @return The deploymentState. - */ - public com.google.cloud.automl.v1beta1.Model.DeploymentState getDeploymentState() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.Model.DeploymentState result = - com.google.cloud.automl.v1beta1.Model.DeploymentState.valueOf(deploymentState_); - return result == null - ? com.google.cloud.automl.v1beta1.Model.DeploymentState.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. Deployment state of the model. A model can only serve
-     * prediction requests after it gets deployed.
-     * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @param value The deploymentState to set. - * @return This builder for chaining. - */ - public Builder setDeploymentState(com.google.cloud.automl.v1beta1.Model.DeploymentState value) { - if (value == null) { - throw new NullPointerException(); - } - - deploymentState_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Deployment state of the model. A model can only serve
-     * prediction requests after it gets deployed.
-     * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @return This builder for chaining. - */ - public Builder clearDeploymentState() { - - deploymentState_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Model) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Model) - private static final com.google.cloud.automl.v1beta1.Model DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Model(); - } - - public static com.google.cloud.automl.v1beta1.Model getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Model parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Model(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Model getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluation.java deleted file mode 100644 index 46082f398..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluation.java +++ /dev/null @@ -1,4136 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/model_evaluation.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Evaluation results of a model.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ModelEvaluation} - */ -public final class ModelEvaluation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ModelEvaluation) - ModelEvaluationOrBuilder { - private static final long serialVersionUID = 0L; - // Use ModelEvaluation.newBuilder() to construct. - private ModelEvaluation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ModelEvaluation() { - name_ = ""; - annotationSpecId_ = ""; - displayName_ = ""; - } - - @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(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - annotationSpecId_ = s; - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - evaluatedExampleCount_ = input.readInt32(); - break; - } - case 66: - { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .Builder - subBuilder = null; - if (metricsCase_ == 8) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics) - metrics_) - .toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics) - metrics_); - metrics_ = subBuilder.buildPartial(); - } - metricsCase_ = 8; - break; - } - case 74: - { - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder subBuilder = - null; - if (metricsCase_ == 9) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_) - .toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_); - metrics_ = subBuilder.buildPartial(); - } - metricsCase_ = 9; - break; - } - case 90: - { - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .Builder - subBuilder = null; - if (metricsCase_ == 11) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetrics) - metrics_) - .toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetrics.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetrics) - metrics_); - metrics_ = subBuilder.buildPartial(); - } - metricsCase_ = 11; - break; - } - case 98: - { - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder - subBuilder = null; - if (metricsCase_ == 12) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - metrics_) - .toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - metrics_); - metrics_ = subBuilder.buildPartial(); - } - metricsCase_ = 12; - break; - } - case 106: - { - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder subBuilder = - null; - if (metricsCase_ == 13) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_) - .toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_); - metrics_ = subBuilder.buildPartial(); - } - metricsCase_ = 13; - break; - } - case 114: - { - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder - subBuilder = null; - if (metricsCase_ == 14) { - subBuilder = - ((com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - metrics_) - .toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - metrics_); - metrics_ = subBuilder.buildPartial(); - } - metricsCase_ = 14; - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 194: - { - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder - subBuilder = null; - if (metricsCase_ == 24) { - subBuilder = - ((com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - metrics_) - .toBuilder(); - } - metrics_ = - input.readMessage( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - metrics_); - metrics_ = subBuilder.buildPartial(); - } - metricsCase_ = 24; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass - .internal_static_google_cloud_automl_v1beta1_ModelEvaluation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass - .internal_static_google_cloud_automl_v1beta1_ModelEvaluation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ModelEvaluation.class, - com.google.cloud.automl.v1beta1.ModelEvaluation.Builder.class); - } - - private int metricsCase_ = 0; - private java.lang.Object metrics_; - - public enum MetricsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - CLASSIFICATION_EVALUATION_METRICS(8), - REGRESSION_EVALUATION_METRICS(24), - TRANSLATION_EVALUATION_METRICS(9), - IMAGE_OBJECT_DETECTION_EVALUATION_METRICS(12), - VIDEO_OBJECT_TRACKING_EVALUATION_METRICS(14), - TEXT_SENTIMENT_EVALUATION_METRICS(11), - TEXT_EXTRACTION_EVALUATION_METRICS(13), - METRICS_NOT_SET(0); - private final int value; - - private MetricsCase(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 MetricsCase valueOf(int value) { - return forNumber(value); - } - - public static MetricsCase forNumber(int value) { - switch (value) { - case 8: - return CLASSIFICATION_EVALUATION_METRICS; - case 24: - return REGRESSION_EVALUATION_METRICS; - case 9: - return TRANSLATION_EVALUATION_METRICS; - case 12: - return IMAGE_OBJECT_DETECTION_EVALUATION_METRICS; - case 14: - return VIDEO_OBJECT_TRACKING_EVALUATION_METRICS; - case 11: - return TEXT_SENTIMENT_EVALUATION_METRICS; - case 13: - return TEXT_EXTRACTION_EVALUATION_METRICS; - case 0: - return METRICS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public MetricsCase getMetricsCase() { - return MetricsCase.forNumber(metricsCase_); - } - - public static final int CLASSIFICATION_EVALUATION_METRICS_FIELD_NUMBER = 8; - /** - * - * - *
-   * Model evaluation metrics for image, text, video and tables
-   * classification.
-   * Tables problem is considered a classification when the target column
-   * is CATEGORY DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - * - * @return Whether the classificationEvaluationMetrics field is set. - */ - public boolean hasClassificationEvaluationMetrics() { - return metricsCase_ == 8; - } - /** - * - * - *
-   * Model evaluation metrics for image, text, video and tables
-   * classification.
-   * Tables problem is considered a classification when the target column
-   * is CATEGORY DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - * - * @return The classificationEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - getClassificationEvaluationMetrics() { - if (metricsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance(); - } - /** - * - * - *
-   * Model evaluation metrics for image, text, video and tables
-   * classification.
-   * Tables problem is considered a classification when the target column
-   * is CATEGORY DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetricsOrBuilder - getClassificationEvaluationMetricsOrBuilder() { - if (metricsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance(); - } - - public static final int REGRESSION_EVALUATION_METRICS_FIELD_NUMBER = 24; - /** - * - * - *
-   * Model evaluation metrics for Tables regression.
-   * Tables problem is considered a regression when the target column
-   * has FLOAT64 DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - * - * @return Whether the regressionEvaluationMetrics field is set. - */ - public boolean hasRegressionEvaluationMetrics() { - return metricsCase_ == 24; - } - /** - * - * - *
-   * Model evaluation metrics for Tables regression.
-   * Tables problem is considered a regression when the target column
-   * has FLOAT64 DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - * - * @return The regressionEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - getRegressionEvaluationMetrics() { - if (metricsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance(); - } - /** - * - * - *
-   * Model evaluation metrics for Tables regression.
-   * Tables problem is considered a regression when the target column
-   * has FLOAT64 DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetricsOrBuilder - getRegressionEvaluationMetricsOrBuilder() { - if (metricsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance(); - } - - public static final int TRANSLATION_EVALUATION_METRICS_FIELD_NUMBER = 9; - /** - * - * - *
-   * Model evaluation metrics for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - * - * @return Whether the translationEvaluationMetrics field is set. - */ - public boolean hasTranslationEvaluationMetrics() { - return metricsCase_ == 9; - } - /** - * - * - *
-   * Model evaluation metrics for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - * - * @return The translationEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics - getTranslationEvaluationMetrics() { - if (metricsCase_ == 9) { - return (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance(); - } - /** - * - * - *
-   * Model evaluation metrics for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetricsOrBuilder - getTranslationEvaluationMetricsOrBuilder() { - if (metricsCase_ == 9) { - return (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance(); - } - - public static final int IMAGE_OBJECT_DETECTION_EVALUATION_METRICS_FIELD_NUMBER = 12; - /** - * - * - *
-   * Model evaluation metrics for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - * - * @return Whether the imageObjectDetectionEvaluationMetrics field is set. - */ - public boolean hasImageObjectDetectionEvaluationMetrics() { - return metricsCase_ == 12; - } - /** - * - * - *
-   * Model evaluation metrics for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - * - * @return The imageObjectDetectionEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - getImageObjectDetectionEvaluationMetrics() { - if (metricsCase_ == 12) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance(); - } - /** - * - * - *
-   * Model evaluation metrics for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsOrBuilder - getImageObjectDetectionEvaluationMetricsOrBuilder() { - if (metricsCase_ == 12) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance(); - } - - public static final int VIDEO_OBJECT_TRACKING_EVALUATION_METRICS_FIELD_NUMBER = 14; - /** - * - * - *
-   * Model evaluation metrics for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - * - * @return Whether the videoObjectTrackingEvaluationMetrics field is set. - */ - public boolean hasVideoObjectTrackingEvaluationMetrics() { - return metricsCase_ == 14; - } - /** - * - * - *
-   * Model evaluation metrics for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - * - * @return The videoObjectTrackingEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - getVideoObjectTrackingEvaluationMetrics() { - if (metricsCase_ == 14) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance(); - } - /** - * - * - *
-   * Model evaluation metrics for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsOrBuilder - getVideoObjectTrackingEvaluationMetricsOrBuilder() { - if (metricsCase_ == 14) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance(); - } - - public static final int TEXT_SENTIMENT_EVALUATION_METRICS_FIELD_NUMBER = 11; - /** - * - * - *
-   * Evaluation metrics for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - * - * @return Whether the textSentimentEvaluationMetrics field is set. - */ - public boolean hasTextSentimentEvaluationMetrics() { - return metricsCase_ == 11; - } - /** - * - * - *
-   * Evaluation metrics for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - * - * @return The textSentimentEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - getTextSentimentEvaluationMetrics() { - if (metricsCase_ == 11) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance(); - } - /** - * - * - *
-   * Evaluation metrics for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetricsOrBuilder - getTextSentimentEvaluationMetricsOrBuilder() { - if (metricsCase_ == 11) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance(); - } - - public static final int TEXT_EXTRACTION_EVALUATION_METRICS_FIELD_NUMBER = 13; - /** - * - * - *
-   * Evaluation metrics for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - * - * @return Whether the textExtractionEvaluationMetrics field is set. - */ - public boolean hasTextExtractionEvaluationMetrics() { - return metricsCase_ == 13; - } - /** - * - * - *
-   * Evaluation metrics for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - * - * @return The textExtractionEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - getTextExtractionEvaluationMetrics() { - if (metricsCase_ == 13) { - return (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance(); - } - /** - * - * - *
-   * Evaluation metrics for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsOrBuilder - getTextExtractionEvaluationMetricsOrBuilder() { - if (metricsCase_ == 13) { - return (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance(); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. Resource name of the model evaluation.
-   * Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Resource name of the model evaluation.
-   * Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object annotationSpecId_; - /** - * - * - *
-   * Output only. The ID of the annotation spec that the model evaluation applies to. The
-   * The ID is empty for the overall model evaluation.
-   * For Tables annotation specs in the dataset do not exist and this ID is
-   * always not set, but for CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * the
-   * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-   * field is used.
-   * 
- * - * string annotation_spec_id = 2; - * - * @return The annotationSpecId. - */ - public java.lang.String getAnnotationSpecId() { - java.lang.Object ref = annotationSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - annotationSpecId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The ID of the annotation spec that the model evaluation applies to. The
-   * The ID is empty for the overall model evaluation.
-   * For Tables annotation specs in the dataset do not exist and this ID is
-   * always not set, but for CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * the
-   * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-   * field is used.
-   * 
- * - * string annotation_spec_id = 2; - * - * @return The bytes for annotationSpecId. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { - java.lang.Object ref = annotationSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - annotationSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISPLAY_NAME_FIELD_NUMBER = 15; - private volatile java.lang.Object displayName_; - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-   * the moment when the model was trained. Because this field returns a value
-   * at model training time, for different models trained from the same dataset,
-   * the values may differ, since display names could had been changed between
-   * the two model's trainings.
-   * For Tables CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * distinct values of the target column at the moment of the model evaluation
-   * are populated here.
-   * The display_name is empty for the overall model evaluation.
-   * 
- * - * string display_name = 15; - * - * @return The displayName. - */ - 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; - } - } - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-   * the moment when the model was trained. Because this field returns a value
-   * at model training time, for different models trained from the same dataset,
-   * the values may differ, since display names could had been changed between
-   * the two model's trainings.
-   * For Tables CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * distinct values of the target column at the moment of the model evaluation
-   * are populated here.
-   * The display_name is empty for the overall model evaluation.
-   * 
- * - * string display_name = 15; - * - * @return The bytes for displayName. - */ - 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 = 5; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. Timestamp when this model evaluation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. Timestamp when this model evaluation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. Timestamp when this model evaluation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int EVALUATED_EXAMPLE_COUNT_FIELD_NUMBER = 6; - private int evaluatedExampleCount_; - /** - * - * - *
-   * Output only. The number of examples used for model evaluation, i.e. for
-   * which ground truth from time of model creation is compared against the
-   * predicted annotations created by the model.
-   * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
-   * the total number of all examples used for evaluation.
-   * Otherwise, this is the count of examples that according to the ground
-   * truth were annotated by the
-   * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
-   * 
- * - * int32 evaluated_example_count = 6; - * - * @return The evaluatedExampleCount. - */ - public int getEvaluatedExampleCount() { - return evaluatedExampleCount_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getAnnotationSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, annotationSpecId_); - } - if (createTime_ != null) { - output.writeMessage(5, getCreateTime()); - } - if (evaluatedExampleCount_ != 0) { - output.writeInt32(6, evaluatedExampleCount_); - } - if (metricsCase_ == 8) { - output.writeMessage( - 8, - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) - metrics_); - } - if (metricsCase_ == 9) { - output.writeMessage( - 9, (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_); - } - if (metricsCase_ == 11) { - output.writeMessage( - 11, - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - metrics_); - } - if (metricsCase_ == 12) { - output.writeMessage( - 12, (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) metrics_); - } - if (metricsCase_ == 13) { - output.writeMessage( - 13, (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_); - } - if (metricsCase_ == 14) { - output.writeMessage( - 14, (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) metrics_); - } - if (!getDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 15, displayName_); - } - if (metricsCase_ == 24) { - output.writeMessage( - 24, - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) metrics_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getAnnotationSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, annotationSpecId_); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); - } - if (evaluatedExampleCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, evaluatedExampleCount_); - } - if (metricsCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, - (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics) - metrics_); - } - if (metricsCase_ == 9) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_); - } - if (metricsCase_ == 11) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 11, - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - metrics_); - } - if (metricsCase_ == 12) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 12, (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) metrics_); - } - if (metricsCase_ == 13) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 13, (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_); - } - if (metricsCase_ == 14) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 14, (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) metrics_); - } - if (!getDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, displayName_); - } - if (metricsCase_ == 24) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 24, - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - metrics_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ModelEvaluation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ModelEvaluation other = - (com.google.cloud.automl.v1beta1.ModelEvaluation) obj; - - if (!getName().equals(other.getName())) return false; - if (!getAnnotationSpecId().equals(other.getAnnotationSpecId())) 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 (getEvaluatedExampleCount() != other.getEvaluatedExampleCount()) return false; - if (!getMetricsCase().equals(other.getMetricsCase())) return false; - switch (metricsCase_) { - case 8: - if (!getClassificationEvaluationMetrics() - .equals(other.getClassificationEvaluationMetrics())) return false; - break; - case 24: - if (!getRegressionEvaluationMetrics().equals(other.getRegressionEvaluationMetrics())) - return false; - break; - case 9: - if (!getTranslationEvaluationMetrics().equals(other.getTranslationEvaluationMetrics())) - return false; - break; - case 12: - if (!getImageObjectDetectionEvaluationMetrics() - .equals(other.getImageObjectDetectionEvaluationMetrics())) return false; - break; - case 14: - if (!getVideoObjectTrackingEvaluationMetrics() - .equals(other.getVideoObjectTrackingEvaluationMetrics())) return false; - break; - case 11: - if (!getTextSentimentEvaluationMetrics().equals(other.getTextSentimentEvaluationMetrics())) - return false; - break; - case 13: - if (!getTextExtractionEvaluationMetrics() - .equals(other.getTextExtractionEvaluationMetrics())) return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getAnnotationSpecId().hashCode(); - 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) + EVALUATED_EXAMPLE_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getEvaluatedExampleCount(); - switch (metricsCase_) { - case 8: - hash = (37 * hash) + CLASSIFICATION_EVALUATION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getClassificationEvaluationMetrics().hashCode(); - break; - case 24: - hash = (37 * hash) + REGRESSION_EVALUATION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getRegressionEvaluationMetrics().hashCode(); - break; - case 9: - hash = (37 * hash) + TRANSLATION_EVALUATION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getTranslationEvaluationMetrics().hashCode(); - break; - case 12: - hash = (37 * hash) + IMAGE_OBJECT_DETECTION_EVALUATION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getImageObjectDetectionEvaluationMetrics().hashCode(); - break; - case 14: - hash = (37 * hash) + VIDEO_OBJECT_TRACKING_EVALUATION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getVideoObjectTrackingEvaluationMetrics().hashCode(); - break; - case 11: - hash = (37 * hash) + TEXT_SENTIMENT_EVALUATION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getTextSentimentEvaluationMetrics().hashCode(); - break; - case 13: - hash = (37 * hash) + TEXT_EXTRACTION_EVALUATION_METRICS_FIELD_NUMBER; - hash = (53 * hash) + getTextExtractionEvaluationMetrics().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.ModelEvaluation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Evaluation results of a model.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ModelEvaluation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ModelEvaluation) - com.google.cloud.automl.v1beta1.ModelEvaluationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass - .internal_static_google_cloud_automl_v1beta1_ModelEvaluation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass - .internal_static_google_cloud_automl_v1beta1_ModelEvaluation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ModelEvaluation.class, - com.google.cloud.automl.v1beta1.ModelEvaluation.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ModelEvaluation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - annotationSpecId_ = ""; - - displayName_ = ""; - - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - evaluatedExampleCount_ = 0; - - metricsCase_ = 0; - metrics_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass - .internal_static_google_cloud_automl_v1beta1_ModelEvaluation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelEvaluation getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ModelEvaluation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelEvaluation build() { - com.google.cloud.automl.v1beta1.ModelEvaluation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelEvaluation buildPartial() { - com.google.cloud.automl.v1beta1.ModelEvaluation result = - new com.google.cloud.automl.v1beta1.ModelEvaluation(this); - if (metricsCase_ == 8) { - if (classificationEvaluationMetricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = classificationEvaluationMetricsBuilder_.build(); - } - } - if (metricsCase_ == 24) { - if (regressionEvaluationMetricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = regressionEvaluationMetricsBuilder_.build(); - } - } - if (metricsCase_ == 9) { - if (translationEvaluationMetricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = translationEvaluationMetricsBuilder_.build(); - } - } - if (metricsCase_ == 12) { - if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = imageObjectDetectionEvaluationMetricsBuilder_.build(); - } - } - if (metricsCase_ == 14) { - if (videoObjectTrackingEvaluationMetricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = videoObjectTrackingEvaluationMetricsBuilder_.build(); - } - } - if (metricsCase_ == 11) { - if (textSentimentEvaluationMetricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = textSentimentEvaluationMetricsBuilder_.build(); - } - } - if (metricsCase_ == 13) { - if (textExtractionEvaluationMetricsBuilder_ == null) { - result.metrics_ = metrics_; - } else { - result.metrics_ = textExtractionEvaluationMetricsBuilder_.build(); - } - } - result.name_ = name_; - result.annotationSpecId_ = annotationSpecId_; - result.displayName_ = displayName_; - if (createTimeBuilder_ == null) { - result.createTime_ = createTime_; - } else { - result.createTime_ = createTimeBuilder_.build(); - } - result.evaluatedExampleCount_ = evaluatedExampleCount_; - result.metricsCase_ = metricsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ModelEvaluation) { - return mergeFrom((com.google.cloud.automl.v1beta1.ModelEvaluation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ModelEvaluation other) { - if (other == com.google.cloud.automl.v1beta1.ModelEvaluation.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getAnnotationSpecId().isEmpty()) { - annotationSpecId_ = other.annotationSpecId_; - onChanged(); - } - if (!other.getDisplayName().isEmpty()) { - displayName_ = other.displayName_; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.getEvaluatedExampleCount() != 0) { - setEvaluatedExampleCount(other.getEvaluatedExampleCount()); - } - switch (other.getMetricsCase()) { - case CLASSIFICATION_EVALUATION_METRICS: - { - mergeClassificationEvaluationMetrics(other.getClassificationEvaluationMetrics()); - break; - } - case REGRESSION_EVALUATION_METRICS: - { - mergeRegressionEvaluationMetrics(other.getRegressionEvaluationMetrics()); - break; - } - case TRANSLATION_EVALUATION_METRICS: - { - mergeTranslationEvaluationMetrics(other.getTranslationEvaluationMetrics()); - break; - } - case IMAGE_OBJECT_DETECTION_EVALUATION_METRICS: - { - mergeImageObjectDetectionEvaluationMetrics( - other.getImageObjectDetectionEvaluationMetrics()); - break; - } - case VIDEO_OBJECT_TRACKING_EVALUATION_METRICS: - { - mergeVideoObjectTrackingEvaluationMetrics( - other.getVideoObjectTrackingEvaluationMetrics()); - break; - } - case TEXT_SENTIMENT_EVALUATION_METRICS: - { - mergeTextSentimentEvaluationMetrics(other.getTextSentimentEvaluationMetrics()); - break; - } - case TEXT_EXTRACTION_EVALUATION_METRICS: - { - mergeTextExtractionEvaluationMetrics(other.getTextExtractionEvaluationMetrics()); - break; - } - case METRICS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ModelEvaluation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.ModelEvaluation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int metricsCase_ = 0; - private java.lang.Object metrics_; - - public MetricsCase getMetricsCase() { - return MetricsCase.forNumber(metricsCase_); - } - - public Builder clearMetrics() { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetricsOrBuilder> - classificationEvaluationMetricsBuilder_; - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - * - * @return Whether the classificationEvaluationMetrics field is set. - */ - public boolean hasClassificationEvaluationMetrics() { - return metricsCase_ == 8; - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - * - * @return The classificationEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - getClassificationEvaluationMetrics() { - if (classificationEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance(); - } else { - if (metricsCase_ == 8) { - return classificationEvaluationMetricsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - public Builder setClassificationEvaluationMetrics( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics value) { - if (classificationEvaluationMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - classificationEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 8; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - public Builder setClassificationEvaluationMetrics( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics.Builder - builderForValue) { - if (classificationEvaluationMetricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - classificationEvaluationMetricsBuilder_.setMessage(builderForValue.build()); - } - metricsCase_ = 8; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - public Builder mergeClassificationEvaluationMetrics( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics value) { - if (classificationEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 8 - && metrics_ - != com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.getDefaultInstance()) { - metrics_ = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .newBuilder( - (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics) - metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - if (metricsCase_ == 8) { - classificationEvaluationMetricsBuilder_.mergeFrom(value); - } - classificationEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 8; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - public Builder clearClassificationEvaluationMetrics() { - if (classificationEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 8) { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - } - } else { - if (metricsCase_ == 8) { - metricsCase_ = 0; - metrics_ = null; - } - classificationEvaluationMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .Builder - getClassificationEvaluationMetricsBuilder() { - return getClassificationEvaluationMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetricsOrBuilder - getClassificationEvaluationMetricsOrBuilder() { - if ((metricsCase_ == 8) && (classificationEvaluationMetricsBuilder_ != null)) { - return classificationEvaluationMetricsBuilder_.getMessageOrBuilder(); - } else { - if (metricsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for image, text, video and tables
-     * classification.
-     * Tables problem is considered a classification when the target column
-     * is CATEGORY DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetricsOrBuilder> - getClassificationEvaluationMetricsFieldBuilder() { - if (classificationEvaluationMetricsBuilder_ == null) { - if (!(metricsCase_ == 8)) { - metrics_ = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .getDefaultInstance(); - } - classificationEvaluationMetricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetricsOrBuilder>( - (com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics) - metrics_, - getParentForChildren(), - isClean()); - metrics_ = null; - } - metricsCase_ = 8; - onChanged(); - ; - return classificationEvaluationMetricsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics, - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetricsOrBuilder> - regressionEvaluationMetricsBuilder_; - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - * - * @return Whether the regressionEvaluationMetrics field is set. - */ - public boolean hasRegressionEvaluationMetrics() { - return metricsCase_ == 24; - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - * - * @return The regressionEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - getRegressionEvaluationMetrics() { - if (regressionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance(); - } else { - if (metricsCase_ == 24) { - return regressionEvaluationMetricsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - public Builder setRegressionEvaluationMetrics( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics value) { - if (regressionEvaluationMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - regressionEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 24; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - public Builder setRegressionEvaluationMetrics( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder - builderForValue) { - if (regressionEvaluationMetricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - regressionEvaluationMetricsBuilder_.setMessage(builderForValue.build()); - } - metricsCase_ = 24; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - public Builder mergeRegressionEvaluationMetrics( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics value) { - if (regressionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 24 - && metrics_ - != com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance()) { - metrics_ = - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .newBuilder( - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - if (metricsCase_ == 24) { - regressionEvaluationMetricsBuilder_.mergeFrom(value); - } - regressionEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 24; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - public Builder clearRegressionEvaluationMetrics() { - if (regressionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 24) { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - } - } else { - if (metricsCase_ == 24) { - metricsCase_ = 0; - metrics_ = null; - } - regressionEvaluationMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder - getRegressionEvaluationMetricsBuilder() { - return getRegressionEvaluationMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetricsOrBuilder - getRegressionEvaluationMetricsOrBuilder() { - if ((metricsCase_ == 24) && (regressionEvaluationMetricsBuilder_ != null)) { - return regressionEvaluationMetricsBuilder_.getMessageOrBuilder(); - } else { - if (metricsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for Tables regression.
-     * Tables problem is considered a regression when the target column
-     * has FLOAT64 DataType.
-     * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics, - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetricsOrBuilder> - getRegressionEvaluationMetricsFieldBuilder() { - if (regressionEvaluationMetricsBuilder_ == null) { - if (!(metricsCase_ == 24)) { - metrics_ = - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance(); - } - regressionEvaluationMetricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics, - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.RegressionProto - .RegressionEvaluationMetricsOrBuilder>( - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - metrics_, - getParentForChildren(), - isClean()); - metrics_ = null; - } - metricsCase_ = 24; - onChanged(); - ; - return regressionEvaluationMetricsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetricsOrBuilder> - translationEvaluationMetricsBuilder_; - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - * - * @return Whether the translationEvaluationMetrics field is set. - */ - public boolean hasTranslationEvaluationMetrics() { - return metricsCase_ == 9; - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - * - * @return The translationEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics - getTranslationEvaluationMetrics() { - if (translationEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 9) { - return (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance(); - } else { - if (metricsCase_ == 9) { - return translationEvaluationMetricsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - public Builder setTranslationEvaluationMetrics( - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics value) { - if (translationEvaluationMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - translationEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 9; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - public Builder setTranslationEvaluationMetrics( - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder builderForValue) { - if (translationEvaluationMetricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - translationEvaluationMetricsBuilder_.setMessage(builderForValue.build()); - } - metricsCase_ = 9; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - public Builder mergeTranslationEvaluationMetrics( - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics value) { - if (translationEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 9 - && metrics_ - != com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics - .getDefaultInstance()) { - metrics_ = - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.newBuilder( - (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - if (metricsCase_ == 9) { - translationEvaluationMetricsBuilder_.mergeFrom(value); - } - translationEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 9; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - public Builder clearTranslationEvaluationMetrics() { - if (translationEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 9) { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - } - } else { - if (metricsCase_ == 9) { - metricsCase_ = 0; - metrics_ = null; - } - translationEvaluationMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder - getTranslationEvaluationMetricsBuilder() { - return getTranslationEvaluationMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetricsOrBuilder - getTranslationEvaluationMetricsOrBuilder() { - if ((metricsCase_ == 9) && (translationEvaluationMetricsBuilder_ != null)) { - return translationEvaluationMetricsBuilder_.getMessageOrBuilder(); - } else { - if (metricsCase_ == 9) { - return (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for translation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetricsOrBuilder> - getTranslationEvaluationMetricsFieldBuilder() { - if (translationEvaluationMetricsBuilder_ == null) { - if (!(metricsCase_ == 9)) { - metrics_ = - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance(); - } - translationEvaluationMetricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetricsOrBuilder>( - (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) metrics_, - getParentForChildren(), - isClean()); - metrics_ = null; - } - metricsCase_ = 9; - onChanged(); - ; - return translationEvaluationMetricsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsOrBuilder> - imageObjectDetectionEvaluationMetricsBuilder_; - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - * - * @return Whether the imageObjectDetectionEvaluationMetrics field is set. - */ - public boolean hasImageObjectDetectionEvaluationMetrics() { - return metricsCase_ == 12; - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - * - * @return The imageObjectDetectionEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - getImageObjectDetectionEvaluationMetrics() { - if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 12) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance(); - } else { - if (metricsCase_ == 12) { - return imageObjectDetectionEvaluationMetricsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - public Builder setImageObjectDetectionEvaluationMetrics( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics value) { - if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - imageObjectDetectionEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 12; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - public Builder setImageObjectDetectionEvaluationMetrics( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder - builderForValue) { - if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - imageObjectDetectionEvaluationMetricsBuilder_.setMessage(builderForValue.build()); - } - metricsCase_ = 12; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - public Builder mergeImageObjectDetectionEvaluationMetrics( - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics value) { - if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 12 - && metrics_ - != com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance()) { - metrics_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.newBuilder( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) - metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - if (metricsCase_ == 12) { - imageObjectDetectionEvaluationMetricsBuilder_.mergeFrom(value); - } - imageObjectDetectionEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 12; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - public Builder clearImageObjectDetectionEvaluationMetrics() { - if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 12) { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - } - } else { - if (metricsCase_ == 12) { - metricsCase_ = 0; - metrics_ = null; - } - imageObjectDetectionEvaluationMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder - getImageObjectDetectionEvaluationMetricsBuilder() { - return getImageObjectDetectionEvaluationMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - public com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsOrBuilder - getImageObjectDetectionEvaluationMetricsOrBuilder() { - if ((metricsCase_ == 12) && (imageObjectDetectionEvaluationMetricsBuilder_ != null)) { - return imageObjectDetectionEvaluationMetricsBuilder_.getMessageOrBuilder(); - } else { - if (metricsCase_ == 12) { - return (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for image object detection.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsOrBuilder> - getImageObjectDetectionEvaluationMetricsFieldBuilder() { - if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { - if (!(metricsCase_ == 12)) { - metrics_ = - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - .getDefaultInstance(); - } - imageObjectDetectionEvaluationMetricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsOrBuilder>( - (com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics) metrics_, - getParentForChildren(), - isClean()); - metrics_ = null; - } - metricsCase_ = 12; - onChanged(); - ; - return imageObjectDetectionEvaluationMetricsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsOrBuilder> - videoObjectTrackingEvaluationMetricsBuilder_; - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - * - * @return Whether the videoObjectTrackingEvaluationMetrics field is set. - */ - public boolean hasVideoObjectTrackingEvaluationMetrics() { - return metricsCase_ == 14; - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - * - * @return The videoObjectTrackingEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - getVideoObjectTrackingEvaluationMetrics() { - if (videoObjectTrackingEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 14) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance(); - } else { - if (metricsCase_ == 14) { - return videoObjectTrackingEvaluationMetricsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - public Builder setVideoObjectTrackingEvaluationMetrics( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics value) { - if (videoObjectTrackingEvaluationMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - videoObjectTrackingEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 14; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - public Builder setVideoObjectTrackingEvaluationMetrics( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder - builderForValue) { - if (videoObjectTrackingEvaluationMetricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - videoObjectTrackingEvaluationMetricsBuilder_.setMessage(builderForValue.build()); - } - metricsCase_ = 14; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - public Builder mergeVideoObjectTrackingEvaluationMetrics( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics value) { - if (videoObjectTrackingEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 14 - && metrics_ - != com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance()) { - metrics_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.newBuilder( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - if (metricsCase_ == 14) { - videoObjectTrackingEvaluationMetricsBuilder_.mergeFrom(value); - } - videoObjectTrackingEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 14; - return this; - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - public Builder clearVideoObjectTrackingEvaluationMetrics() { - if (videoObjectTrackingEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 14) { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - } - } else { - if (metricsCase_ == 14) { - metricsCase_ = 0; - metrics_ = null; - } - videoObjectTrackingEvaluationMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder - getVideoObjectTrackingEvaluationMetricsBuilder() { - return getVideoObjectTrackingEvaluationMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsOrBuilder - getVideoObjectTrackingEvaluationMetricsOrBuilder() { - if ((metricsCase_ == 14) && (videoObjectTrackingEvaluationMetricsBuilder_ != null)) { - return videoObjectTrackingEvaluationMetricsBuilder_.getMessageOrBuilder(); - } else { - if (metricsCase_ == 14) { - return (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Model evaluation metrics for video object tracking.
-     * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsOrBuilder> - getVideoObjectTrackingEvaluationMetricsFieldBuilder() { - if (videoObjectTrackingEvaluationMetricsBuilder_ == null) { - if (!(metricsCase_ == 14)) { - metrics_ = - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance(); - } - videoObjectTrackingEvaluationMetricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsOrBuilder>( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) metrics_, - getParentForChildren(), - isClean()); - metrics_ = null; - } - metricsCase_ = 14; - onChanged(); - ; - return videoObjectTrackingEvaluationMetricsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .Builder, - com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetricsOrBuilder> - textSentimentEvaluationMetricsBuilder_; - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - * - * @return Whether the textSentimentEvaluationMetrics field is set. - */ - public boolean hasTextSentimentEvaluationMetrics() { - return metricsCase_ == 11; - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - * - * @return The textSentimentEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - getTextSentimentEvaluationMetrics() { - if (textSentimentEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 11) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance(); - } else { - if (metricsCase_ == 11) { - return textSentimentEvaluationMetricsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - public Builder setTextSentimentEvaluationMetrics( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics value) { - if (textSentimentEvaluationMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - textSentimentEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 11; - return this; - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - public Builder setTextSentimentEvaluationMetrics( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics.Builder - builderForValue) { - if (textSentimentEvaluationMetricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - textSentimentEvaluationMetricsBuilder_.setMessage(builderForValue.build()); - } - metricsCase_ = 11; - return this; - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - public Builder mergeTextSentimentEvaluationMetrics( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics value) { - if (textSentimentEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 11 - && metrics_ - != com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance()) { - metrics_ = - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .newBuilder( - (com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetrics) - metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - if (metricsCase_ == 11) { - textSentimentEvaluationMetricsBuilder_.mergeFrom(value); - } - textSentimentEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 11; - return this; - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - public Builder clearTextSentimentEvaluationMetrics() { - if (textSentimentEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 11) { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - } - } else { - if (metricsCase_ == 11) { - metricsCase_ = 0; - metrics_ = null; - } - textSentimentEvaluationMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics.Builder - getTextSentimentEvaluationMetricsBuilder() { - return getTextSentimentEvaluationMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - public com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetricsOrBuilder - getTextSentimentEvaluationMetricsOrBuilder() { - if ((metricsCase_ == 11) && (textSentimentEvaluationMetricsBuilder_ != null)) { - return textSentimentEvaluationMetricsBuilder_.getMessageOrBuilder(); - } else { - if (metricsCase_ == 11) { - return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - metrics_; - } - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Evaluation metrics for text sentiment models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .Builder, - com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetricsOrBuilder> - getTextSentimentEvaluationMetricsFieldBuilder() { - if (textSentimentEvaluationMetricsBuilder_ == null) { - if (!(metricsCase_ == 11)) { - metrics_ = - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance(); - } - textSentimentEvaluationMetricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .Builder, - com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetricsOrBuilder>( - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - metrics_, - getParentForChildren(), - isClean()); - metrics_ = null; - } - metricsCase_ = 11; - onChanged(); - ; - return textSentimentEvaluationMetricsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsOrBuilder> - textExtractionEvaluationMetricsBuilder_; - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - * - * @return Whether the textExtractionEvaluationMetrics field is set. - */ - public boolean hasTextExtractionEvaluationMetrics() { - return metricsCase_ == 13; - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - * - * @return The textExtractionEvaluationMetrics. - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - getTextExtractionEvaluationMetrics() { - if (textExtractionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 13) { - return (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance(); - } else { - if (metricsCase_ == 13) { - return textExtractionEvaluationMetricsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance(); - } - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - public Builder setTextExtractionEvaluationMetrics( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics value) { - if (textExtractionEvaluationMetricsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metrics_ = value; - onChanged(); - } else { - textExtractionEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 13; - return this; - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - public Builder setTextExtractionEvaluationMetrics( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder builderForValue) { - if (textExtractionEvaluationMetricsBuilder_ == null) { - metrics_ = builderForValue.build(); - onChanged(); - } else { - textExtractionEvaluationMetricsBuilder_.setMessage(builderForValue.build()); - } - metricsCase_ = 13; - return this; - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - public Builder mergeTextExtractionEvaluationMetrics( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics value) { - if (textExtractionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 13 - && metrics_ - != com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .getDefaultInstance()) { - metrics_ = - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.newBuilder( - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_) - .mergeFrom(value) - .buildPartial(); - } else { - metrics_ = value; - } - onChanged(); - } else { - if (metricsCase_ == 13) { - textExtractionEvaluationMetricsBuilder_.mergeFrom(value); - } - textExtractionEvaluationMetricsBuilder_.setMessage(value); - } - metricsCase_ = 13; - return this; - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - public Builder clearTextExtractionEvaluationMetrics() { - if (textExtractionEvaluationMetricsBuilder_ == null) { - if (metricsCase_ == 13) { - metricsCase_ = 0; - metrics_ = null; - onChanged(); - } - } else { - if (metricsCase_ == 13) { - metricsCase_ = 0; - metrics_ = null; - } - textExtractionEvaluationMetricsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder - getTextExtractionEvaluationMetricsBuilder() { - return getTextExtractionEvaluationMetricsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsOrBuilder - getTextExtractionEvaluationMetricsOrBuilder() { - if ((metricsCase_ == 13) && (textExtractionEvaluationMetricsBuilder_ != null)) { - return textExtractionEvaluationMetricsBuilder_.getMessageOrBuilder(); - } else { - if (metricsCase_ == 13) { - return (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_; - } - return com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance(); - } - } - /** - * - * - *
-     * Evaluation metrics for text extraction models.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsOrBuilder> - getTextExtractionEvaluationMetricsFieldBuilder() { - if (textExtractionEvaluationMetricsBuilder_ == null) { - if (!(metricsCase_ == 13)) { - metrics_ = - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance(); - } - textExtractionEvaluationMetricsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsOrBuilder>( - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) metrics_, - getParentForChildren(), - isClean()); - metrics_ = null; - } - metricsCase_ = 13; - onChanged(); - ; - return textExtractionEvaluationMetricsBuilder_; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. Resource name of the model evaluation.
-     * Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-     * 
- * - * string name = 1; - * - * @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 model evaluation.
-     * Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. Resource name of the model evaluation.
-     * Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-     * 
- * - * string name = 1; - * - * @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 model evaluation.
-     * Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Resource name of the model evaluation.
-     * Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-     * 
- * - * string name = 1; - * - * @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 annotationSpecId_ = ""; - /** - * - * - *
-     * Output only. The ID of the annotation spec that the model evaluation applies to. The
-     * The ID is empty for the overall model evaluation.
-     * For Tables annotation specs in the dataset do not exist and this ID is
-     * always not set, but for CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * the
-     * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-     * field is used.
-     * 
- * - * string annotation_spec_id = 2; - * - * @return The annotationSpecId. - */ - public java.lang.String getAnnotationSpecId() { - java.lang.Object ref = annotationSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - annotationSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The ID of the annotation spec that the model evaluation applies to. The
-     * The ID is empty for the overall model evaluation.
-     * For Tables annotation specs in the dataset do not exist and this ID is
-     * always not set, but for CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * the
-     * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-     * field is used.
-     * 
- * - * string annotation_spec_id = 2; - * - * @return The bytes for annotationSpecId. - */ - public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { - java.lang.Object ref = annotationSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - annotationSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The ID of the annotation spec that the model evaluation applies to. The
-     * The ID is empty for the overall model evaluation.
-     * For Tables annotation specs in the dataset do not exist and this ID is
-     * always not set, but for CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * the
-     * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-     * field is used.
-     * 
- * - * string annotation_spec_id = 2; - * - * @param value The annotationSpecId to set. - * @return This builder for chaining. - */ - public Builder setAnnotationSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - annotationSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The ID of the annotation spec that the model evaluation applies to. The
-     * The ID is empty for the overall model evaluation.
-     * For Tables annotation specs in the dataset do not exist and this ID is
-     * always not set, but for CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * the
-     * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-     * field is used.
-     * 
- * - * string annotation_spec_id = 2; - * - * @return This builder for chaining. - */ - public Builder clearAnnotationSpecId() { - - annotationSpecId_ = getDefaultInstance().getAnnotationSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The ID of the annotation spec that the model evaluation applies to. The
-     * The ID is empty for the overall model evaluation.
-     * For Tables annotation specs in the dataset do not exist and this ID is
-     * always not set, but for CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * the
-     * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-     * field is used.
-     * 
- * - * string annotation_spec_id = 2; - * - * @param value The bytes for annotationSpecId to set. - * @return This builder for chaining. - */ - public Builder setAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - annotationSpecId_ = value; - onChanged(); - return this; - } - - private java.lang.Object displayName_ = ""; - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-     * the moment when the model was trained. Because this field returns a value
-     * at model training time, for different models trained from the same dataset,
-     * the values may differ, since display names could had been changed between
-     * the two model's trainings.
-     * For Tables CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * distinct values of the target column at the moment of the model evaluation
-     * are populated here.
-     * The display_name is empty for the overall model evaluation.
-     * 
- * - * string display_name = 15; - * - * @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; - } - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-     * the moment when the model was trained. Because this field returns a value
-     * at model training time, for different models trained from the same dataset,
-     * the values may differ, since display names could had been changed between
-     * the two model's trainings.
-     * For Tables CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * distinct values of the target column at the moment of the model evaluation
-     * are populated here.
-     * The display_name is empty for the overall model evaluation.
-     * 
- * - * string display_name = 15; - * - * @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; - } - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-     * the moment when the model was trained. Because this field returns a value
-     * at model training time, for different models trained from the same dataset,
-     * the values may differ, since display names could had been changed between
-     * the two model's trainings.
-     * For Tables CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * distinct values of the target column at the moment of the model evaluation
-     * are populated here.
-     * The display_name is empty for the overall model evaluation.
-     * 
- * - * string display_name = 15; - * - * @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; - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-     * the moment when the model was trained. Because this field returns a value
-     * at model training time, for different models trained from the same dataset,
-     * the values may differ, since display names could had been changed between
-     * the two model's trainings.
-     * For Tables CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * distinct values of the target column at the moment of the model evaluation
-     * are populated here.
-     * The display_name is empty for the overall model evaluation.
-     * 
- * - * string display_name = 15; - * - * @return This builder for chaining. - */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The value of
-     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-     * the moment when the model was trained. Because this field returns a value
-     * at model training time, for different models trained from the same dataset,
-     * the values may differ, since display names could had been changed between
-     * the two model's trainings.
-     * For Tables CLASSIFICATION
-     * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-     * distinct values of the target column at the moment of the model evaluation
-     * are populated here.
-     * The display_name is empty for the overall model evaluation.
-     * 
- * - * string display_name = 15; - * - * @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 model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTimeBuilder_ != null || createTime_ != null; - } - /** - * - * - *
-     * Output only. Timestamp when this model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @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 evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Timestamp when this model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Timestamp when this model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. Timestamp when this model evaluation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private int evaluatedExampleCount_; - /** - * - * - *
-     * Output only. The number of examples used for model evaluation, i.e. for
-     * which ground truth from time of model creation is compared against the
-     * predicted annotations created by the model.
-     * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
-     * the total number of all examples used for evaluation.
-     * Otherwise, this is the count of examples that according to the ground
-     * truth were annotated by the
-     * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
-     * 
- * - * int32 evaluated_example_count = 6; - * - * @return The evaluatedExampleCount. - */ - public int getEvaluatedExampleCount() { - return evaluatedExampleCount_; - } - /** - * - * - *
-     * Output only. The number of examples used for model evaluation, i.e. for
-     * which ground truth from time of model creation is compared against the
-     * predicted annotations created by the model.
-     * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
-     * the total number of all examples used for evaluation.
-     * Otherwise, this is the count of examples that according to the ground
-     * truth were annotated by the
-     * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
-     * 
- * - * int32 evaluated_example_count = 6; - * - * @param value The evaluatedExampleCount to set. - * @return This builder for chaining. - */ - public Builder setEvaluatedExampleCount(int value) { - - evaluatedExampleCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of examples used for model evaluation, i.e. for
-     * which ground truth from time of model creation is compared against the
-     * predicted annotations created by the model.
-     * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
-     * the total number of all examples used for evaluation.
-     * Otherwise, this is the count of examples that according to the ground
-     * truth were annotated by the
-     * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
-     * 
- * - * int32 evaluated_example_count = 6; - * - * @return This builder for chaining. - */ - public Builder clearEvaluatedExampleCount() { - - evaluatedExampleCount_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ModelEvaluation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ModelEvaluation) - private static final com.google.cloud.automl.v1beta1.ModelEvaluation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ModelEvaluation(); - } - - public static com.google.cloud.automl.v1beta1.ModelEvaluation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ModelEvaluation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ModelEvaluation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelEvaluation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationName.java deleted file mode 100644 index 57c5efe05..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationName.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.automl.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ModelEvaluationName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String model; - private final String modelEvaluation; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getModel() { - return model; - } - - public String getModelEvaluation() { - return modelEvaluation; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ModelEvaluationName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - model = Preconditions.checkNotNull(builder.getModel()); - modelEvaluation = Preconditions.checkNotNull(builder.getModelEvaluation()); - } - - public static ModelEvaluationName of( - String project, String location, String model, String modelEvaluation) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setModel(model) - .setModelEvaluation(modelEvaluation) - .build(); - } - - public static String format( - String project, String location, String model, String modelEvaluation) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setModel(model) - .setModelEvaluation(modelEvaluation) - .build() - .toString(); - } - - public static ModelEvaluationName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ModelEvaluationName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("model"), - matchMap.get("model_evaluation")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ModelEvaluationName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldMapBuilder.put("model", model); - fieldMapBuilder.put("modelEvaluation", modelEvaluation); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate( - "project", - project, - "location", - location, - "model", - model, - "model_evaluation", - modelEvaluation); - } - - /** Builder for ModelEvaluationName. */ - public static class Builder { - - private String project; - private String location; - private String model; - private String modelEvaluation; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getModel() { - return model; - } - - public String getModelEvaluation() { - return modelEvaluation; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setModel(String model) { - this.model = model; - return this; - } - - public Builder setModelEvaluation(String modelEvaluation) { - this.modelEvaluation = modelEvaluation; - return this; - } - - private Builder() {} - - private Builder(ModelEvaluationName modelEvaluationName) { - project = modelEvaluationName.project; - location = modelEvaluationName.location; - model = modelEvaluationName.model; - modelEvaluation = modelEvaluationName.modelEvaluation; - } - - public ModelEvaluationName build() { - return new ModelEvaluationName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ModelEvaluationName) { - ModelEvaluationName that = (ModelEvaluationName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.model.equals(that.model)) - && (this.modelEvaluation.equals(that.modelEvaluation)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= model.hashCode(); - h *= 1000003; - h ^= modelEvaluation.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOrBuilder.java deleted file mode 100644 index f1b473442..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOrBuilder.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/model_evaluation.proto - -package com.google.cloud.automl.v1beta1; - -public interface ModelEvaluationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ModelEvaluation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Model evaluation metrics for image, text, video and tables
-   * classification.
-   * Tables problem is considered a classification when the target column
-   * is CATEGORY DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - * - * @return Whether the classificationEvaluationMetrics field is set. - */ - boolean hasClassificationEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for image, text, video and tables
-   * classification.
-   * Tables problem is considered a classification when the target column
-   * is CATEGORY DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - * - * @return The classificationEvaluationMetrics. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - getClassificationEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for image, text, video and tables
-   * classification.
-   * Tables problem is considered a classification when the target column
-   * is CATEGORY DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetricsOrBuilder - getClassificationEvaluationMetricsOrBuilder(); - - /** - * - * - *
-   * Model evaluation metrics for Tables regression.
-   * Tables problem is considered a regression when the target column
-   * has FLOAT64 DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - * - * @return Whether the regressionEvaluationMetrics field is set. - */ - boolean hasRegressionEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for Tables regression.
-   * Tables problem is considered a regression when the target column
-   * has FLOAT64 DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - * - * @return The regressionEvaluationMetrics. - */ - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - getRegressionEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for Tables regression.
-   * Tables problem is considered a regression when the target column
-   * has FLOAT64 DataType.
-   * 
- * - * - * .google.cloud.automl.v1beta1.RegressionEvaluationMetrics regression_evaluation_metrics = 24; - * - */ - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetricsOrBuilder - getRegressionEvaluationMetricsOrBuilder(); - - /** - * - * - *
-   * Model evaluation metrics for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - * - * @return Whether the translationEvaluationMetrics field is set. - */ - boolean hasTranslationEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - * - * @return The translationEvaluationMetrics. - */ - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics getTranslationEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for translation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; - * - */ - com.google.cloud.automl.v1beta1.TranslationEvaluationMetricsOrBuilder - getTranslationEvaluationMetricsOrBuilder(); - - /** - * - * - *
-   * Model evaluation metrics for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - * - * @return Whether the imageObjectDetectionEvaluationMetrics field is set. - */ - boolean hasImageObjectDetectionEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - * - * @return The imageObjectDetectionEvaluationMetrics. - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics - getImageObjectDetectionEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for image object detection.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - * - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionEvaluationMetricsOrBuilder - getImageObjectDetectionEvaluationMetricsOrBuilder(); - - /** - * - * - *
-   * Model evaluation metrics for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - * - * @return Whether the videoObjectTrackingEvaluationMetrics field is set. - */ - boolean hasVideoObjectTrackingEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - * - * @return The videoObjectTrackingEvaluationMetrics. - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - getVideoObjectTrackingEvaluationMetrics(); - /** - * - * - *
-   * Model evaluation metrics for video object tracking.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - * - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsOrBuilder - getVideoObjectTrackingEvaluationMetricsOrBuilder(); - - /** - * - * - *
-   * Evaluation metrics for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - * - * @return Whether the textSentimentEvaluationMetrics field is set. - */ - boolean hasTextSentimentEvaluationMetrics(); - /** - * - * - *
-   * Evaluation metrics for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - * - * @return The textSentimentEvaluationMetrics. - */ - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - getTextSentimentEvaluationMetrics(); - /** - * - * - *
-   * Evaluation metrics for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - * - */ - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetricsOrBuilder - getTextSentimentEvaluationMetricsOrBuilder(); - - /** - * - * - *
-   * Evaluation metrics for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - * - * @return Whether the textExtractionEvaluationMetrics field is set. - */ - boolean hasTextExtractionEvaluationMetrics(); - /** - * - * - *
-   * Evaluation metrics for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - * - * @return The textExtractionEvaluationMetrics. - */ - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - getTextExtractionEvaluationMetrics(); - /** - * - * - *
-   * Evaluation metrics for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - * - */ - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsOrBuilder - getTextExtractionEvaluationMetricsOrBuilder(); - - /** - * - * - *
-   * Output only. Resource name of the model evaluation.
-   * Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. Resource name of the model evaluation.
-   * Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Output only. The ID of the annotation spec that the model evaluation applies to. The
-   * The ID is empty for the overall model evaluation.
-   * For Tables annotation specs in the dataset do not exist and this ID is
-   * always not set, but for CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * the
-   * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-   * field is used.
-   * 
- * - * string annotation_spec_id = 2; - * - * @return The annotationSpecId. - */ - java.lang.String getAnnotationSpecId(); - /** - * - * - *
-   * Output only. The ID of the annotation spec that the model evaluation applies to. The
-   * The ID is empty for the overall model evaluation.
-   * For Tables annotation specs in the dataset do not exist and this ID is
-   * always not set, but for CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * the
-   * [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name]
-   * field is used.
-   * 
- * - * string annotation_spec_id = 2; - * - * @return The bytes for annotationSpecId. - */ - com.google.protobuf.ByteString getAnnotationSpecIdBytes(); - - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-   * the moment when the model was trained. Because this field returns a value
-   * at model training time, for different models trained from the same dataset,
-   * the values may differ, since display names could had been changed between
-   * the two model's trainings.
-   * For Tables CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * distinct values of the target column at the moment of the model evaluation
-   * are populated here.
-   * The display_name is empty for the overall model evaluation.
-   * 
- * - * string display_name = 15; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Output only. The value of
-   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at
-   * the moment when the model was trained. Because this field returns a value
-   * at model training time, for different models trained from the same dataset,
-   * the values may differ, since display names could had been changed between
-   * the two model's trainings.
-   * For Tables CLASSIFICATION
-   * [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]
-   * distinct values of the target column at the moment of the model evaluation
-   * are populated here.
-   * The display_name is empty for the overall model evaluation.
-   * 
- * - * string display_name = 15; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Output only. Timestamp when this model evaluation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. Timestamp when this model evaluation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. Timestamp when this model evaluation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 5; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The number of examples used for model evaluation, i.e. for
-   * which ground truth from time of model creation is compared against the
-   * predicted annotations created by the model.
-   * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is
-   * the total number of all examples used for evaluation.
-   * Otherwise, this is the count of examples that according to the ground
-   * truth were annotated by the
-   * [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id].
-   * 
- * - * int32 evaluated_example_count = 6; - * - * @return The evaluatedExampleCount. - */ - int getEvaluatedExampleCount(); - - public com.google.cloud.automl.v1beta1.ModelEvaluation.MetricsCase getMetricsCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOuterClass.java deleted file mode 100644 index c86e09bb8..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelEvaluationOuterClass.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/model_evaluation.proto - -package com.google.cloud.automl.v1beta1; - -public final class ModelEvaluationOuterClass { - private ModelEvaluationOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ModelEvaluation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_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 = { - "\n2google/cloud/automl/v1beta1/model_eval" - + "uation.proto\022\033google.cloud.automl.v1beta" - + "1\032\031google/api/resource.proto\0320google/clo" - + "ud/automl/v1beta1/classification.proto\032+" - + "google/cloud/automl/v1beta1/detection.pr" - + "oto\032,google/cloud/automl/v1beta1/regress" - + "ion.proto\032(google/cloud/automl/v1beta1/t" - + "ables.proto\0321google/cloud/automl/v1beta1" - + "/text_extraction.proto\0320google/cloud/aut" - + "oml/v1beta1/text_sentiment.proto\032-google" - + "/cloud/automl/v1beta1/translation.proto\032" - + "\037google/protobuf/timestamp.proto\032\034google" - + "/api/annotations.proto\"\261\010\n\017ModelEvaluati" - + "on\022i\n!classification_evaluation_metrics\030" - + "\010 \001(\0132<.google.cloud.automl.v1beta1.Clas" - + "sificationEvaluationMetricsH\000\022a\n\035regress" - + "ion_evaluation_metrics\030\030 \001(\01328.google.cl" - + "oud.automl.v1beta1.RegressionEvaluationM" - + "etricsH\000\022c\n\036translation_evaluation_metri" - + "cs\030\t \001(\01329.google.cloud.automl.v1beta1.T" - + "ranslationEvaluationMetricsH\000\022w\n)image_o" - + "bject_detection_evaluation_metrics\030\014 \001(\013" - + "2B.google.cloud.automl.v1beta1.ImageObje" - + "ctDetectionEvaluationMetricsH\000\022u\n(video_" - + "object_tracking_evaluation_metrics\030\016 \001(\013" - + "2A.google.cloud.automl.v1beta1.VideoObje" - + "ctTrackingEvaluationMetricsH\000\022h\n!text_se" - + "ntiment_evaluation_metrics\030\013 \001(\0132;.googl" - + "e.cloud.automl.v1beta1.TextSentimentEval" - + "uationMetricsH\000\022j\n\"text_extraction_evalu" - + "ation_metrics\030\r \001(\0132<.google.cloud.autom" - + "l.v1beta1.TextExtractionEvaluationMetric" - + "sH\000\022\014\n\004name\030\001 \001(\t\022\032\n\022annotation_spec_id\030" - + "\002 \001(\t\022\024\n\014display_name\030\017 \001(\t\022/\n\013create_ti" - + "me\030\005 \001(\0132\032.google.protobuf.Timestamp\022\037\n\027" - + "evaluated_example_count\030\006 \001(\005:\207\001\352A\203\001\n%au" - + "toml.googleapis.com/ModelEvaluation\022Zpro" - + "jects/{project}/locations/{location}/mod" - + "els/{model}/modelEvaluations/{model_eval" - + "uation}B\t\n\007metricsB\245\001\n\037com.google.cloud." - + "automl.v1beta1P\001ZAgoogle.golang.org/genp" - + "roto/googleapis/cloud/automl/v1beta1;aut" - + "oml\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002\036Goog" - + "le::Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Detection.getDescriptor(), - com.google.cloud.automl.v1beta1.RegressionProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Tables.getDescriptor(), - com.google.cloud.automl.v1beta1.TextExtraction.getDescriptor(), - com.google.cloud.automl.v1beta1.TextSentimentProto.getDescriptor(), - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_ModelEvaluation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_ModelEvaluation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ModelEvaluation_descriptor, - new java.lang.String[] { - "ClassificationEvaluationMetrics", - "RegressionEvaluationMetrics", - "TranslationEvaluationMetrics", - "ImageObjectDetectionEvaluationMetrics", - "VideoObjectTrackingEvaluationMetrics", - "TextSentimentEvaluationMetrics", - "TextExtractionEvaluationMetrics", - "Name", - "AnnotationSpecId", - "DisplayName", - "CreateTime", - "EvaluatedExampleCount", - "Metrics", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Detection.getDescriptor(); - com.google.cloud.automl.v1beta1.RegressionProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Tables.getDescriptor(); - com.google.cloud.automl.v1beta1.TextExtraction.getDescriptor(); - com.google.cloud.automl.v1beta1.TextSentimentProto.getDescriptor(); - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java deleted file mode 100644 index 9ad66ed12..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java +++ /dev/null @@ -1,1969 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Output configuration for ModelExport Action.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ModelExportOutputConfig} - */ -public final class ModelExportOutputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.ModelExportOutputConfig) - ModelExportOutputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use ModelExportOutputConfig.newBuilder() to construct. - private ModelExportOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ModelExportOutputConfig() { - modelFormat_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ModelExportOutputConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ModelExportOutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.automl.v1beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.automl.v1beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.automl.v1beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = - com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put(params__.getKey(), params__.getValue()); - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.GcrDestination.Builder subBuilder = null; - if (destinationCase_ == 3) { - subBuilder = - ((com.google.cloud.automl.v1beta1.GcrDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.automl.v1beta1.GcrDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.GcrDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 3; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - modelFormat_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.class, - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.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), - GCR_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 1: - return GCS_DESTINATION; - case 3: - return GCR_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 model is to be written to.
-   * This location may only be set for the following model formats:
-   *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-   *  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.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-   * The Google Cloud Storage location where the model is to be written to.
-   * This location may only be set for the following model formats:
-   *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-   *  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.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - /** - * - * - *
-   * The Google Cloud Storage location where the model is to be written to.
-   * This location may only be set for the following model formats:
-   *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-   *  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.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - - public static final int GCR_DESTINATION_FIELD_NUMBER = 3; - /** - * - * - *
-   * The GCR location where model image is to be pushed to. This location
-   * may only be set for the following model formats:
-   *   "docker".
-   * The model image will be created under the given URI.
-   * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - * - * @return Whether the gcrDestination field is set. - */ - public boolean hasGcrDestination() { - return destinationCase_ == 3; - } - /** - * - * - *
-   * The GCR location where model image is to be pushed to. This location
-   * may only be set for the following model formats:
-   *   "docker".
-   * The model image will be created under the given URI.
-   * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - * - * @return The gcrDestination. - */ - public com.google.cloud.automl.v1beta1.GcrDestination getGcrDestination() { - if (destinationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.GcrDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance(); - } - /** - * - * - *
-   * The GCR location where model image is to be pushed to. This location
-   * may only be set for the following model formats:
-   *   "docker".
-   * The model image will be created under the given URI.
-   * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - public com.google.cloud.automl.v1beta1.GcrDestinationOrBuilder getGcrDestinationOrBuilder() { - if (destinationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.GcrDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance(); - } - - public static final int MODEL_FORMAT_FIELD_NUMBER = 4; - private volatile java.lang.Object modelFormat_; - /** - * - * - *
-   * The format in which the model must be exported. The available, and default,
-   * formats depend on the problem and model type (if given problem and type
-   * combination doesn't have a format listed, it means its models are not
-   * exportable):
-   * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-   *        mobile-high-accuracy-1:
-   *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-   *      "docker".
-   * *  For Image Classification mobile-core-ml-low-latency-1,
-   *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-   *      "core_ml" (default).
-   * Formats description:
-   * * 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.
-   * * docker - Used for Docker containers. Use the params field to customize
-   *            the container. The container is verified to work correctly on
-   *            ubuntu 16.04 operating system. See more at
-   *            [containers
-   * quickstart](https:
-   * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-   * * core_ml - Used for iOS mobile devices.
-   * 
- * - * string model_format = 4; - * - * @return The modelFormat. - */ - public java.lang.String getModelFormat() { - java.lang.Object ref = modelFormat_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelFormat_ = s; - return s; - } - } - /** - * - * - *
-   * The format in which the model must be exported. The available, and default,
-   * formats depend on the problem and model type (if given problem and type
-   * combination doesn't have a format listed, it means its models are not
-   * exportable):
-   * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-   *        mobile-high-accuracy-1:
-   *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-   *      "docker".
-   * *  For Image Classification mobile-core-ml-low-latency-1,
-   *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-   *      "core_ml" (default).
-   * Formats description:
-   * * 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.
-   * * docker - Used for Docker containers. Use the params field to customize
-   *            the container. The container is verified to work correctly on
-   *            ubuntu 16.04 operating system. See more at
-   *            [containers
-   * quickstart](https:
-   * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-   * * core_ml - Used for iOS mobile devices.
-   * 
- * - * string model_format = 4; - * - * @return The bytes for modelFormat. - */ - public com.google.protobuf.ByteString getModelFormatBytes() { - java.lang.Object ref = modelFormat_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelFormat_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PARAMS_FIELD_NUMBER = 2; - - private static final class ParamsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_ParamsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.automl.v1beta1.GcsDestination) destination_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 2); - if (destinationCase_ == 3) { - output.writeMessage(3, (com.google.cloud.automl.v1beta1.GcrDestination) destination_); - } - if (!getModelFormatBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, modelFormat_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.automl.v1beta1.GcsDestination) destination_); - } - for (java.util.Map.Entry entry : - internalGetParams().getMap().entrySet()) { - com.google.protobuf.MapEntry params__ = - ParamsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, params__); - } - if (destinationCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.automl.v1beta1.GcrDestination) destination_); - } - if (!getModelFormatBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, modelFormat_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.ModelExportOutputConfig)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.ModelExportOutputConfig other = - (com.google.cloud.automl.v1beta1.ModelExportOutputConfig) obj; - - if (!getModelFormat().equals(other.getModelFormat())) return false; - if (!internalGetParams().equals(other.internalGetParams())) return false; - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination().equals(other.getGcsDestination())) return false; - break; - case 3: - if (!getGcrDestination().equals(other.getGcrDestination())) 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) + MODEL_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getModelFormat().hashCode(); - if (!internalGetParams().getMap().isEmpty()) { - hash = (37 * hash) + PARAMS_FIELD_NUMBER; - hash = (53 * hash) + internalGetParams().hashCode(); - } - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 3: - hash = (37 * hash) + GCR_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcrDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.ModelExportOutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 ModelExport Action.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.ModelExportOutputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.ModelExportOutputConfig) - com.google.cloud.automl.v1beta1.ModelExportOutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.class, - com.google.cloud.automl.v1beta1.ModelExportOutputConfig.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.ModelExportOutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - modelFormat_ = ""; - - internalGetMutableParams().clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_ModelExportOutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.ModelExportOutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig build() { - com.google.cloud.automl.v1beta1.ModelExportOutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig buildPartial() { - com.google.cloud.automl.v1beta1.ModelExportOutputConfig result = - new com.google.cloud.automl.v1beta1.ModelExportOutputConfig(this); - int from_bitField0_ = bitField0_; - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - if (destinationCase_ == 3) { - if (gcrDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcrDestinationBuilder_.build(); - } - } - result.modelFormat_ = modelFormat_; - result.params_ = internalGetParams(); - result.params_.makeImmutable(); - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.ModelExportOutputConfig) { - return mergeFrom((com.google.cloud.automl.v1beta1.ModelExportOutputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.ModelExportOutputConfig other) { - if (other == com.google.cloud.automl.v1beta1.ModelExportOutputConfig.getDefaultInstance()) - return this; - if (!other.getModelFormat().isEmpty()) { - modelFormat_ = other.modelFormat_; - onChanged(); - } - internalGetMutableParams().mergeFrom(other.internalGetParams()); - switch (other.getDestinationCase()) { - case GCS_DESTINATION: - { - mergeGcsDestination(other.getGcsDestination()); - break; - } - case GCR_DESTINATION: - { - mergeGcrDestination(other.getGcrDestination()); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.ModelExportOutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.ModelExportOutputConfig) 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 int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder> - gcsDestinationBuilder_; - /** - * - * - *
-     * The Google Cloud Storage location where the model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-     * The Google Cloud Storage location where the model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location where the model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.automl.v1beta1.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 model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.automl.v1beta1.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 model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.automl.v1beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 - && destination_ - != com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.automl.v1beta1.GcsDestination.newBuilder( - (com.google.cloud.automl.v1beta1.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 model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.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 model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The Google Cloud Storage location where the model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location where the model is to be written to.
-     * This location may only be set for the following model formats:
-     *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-     *  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.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder>( - (com.google.cloud.automl.v1beta1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged(); - ; - return gcsDestinationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcrDestination, - com.google.cloud.automl.v1beta1.GcrDestination.Builder, - com.google.cloud.automl.v1beta1.GcrDestinationOrBuilder> - gcrDestinationBuilder_; - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - * - * @return Whether the gcrDestination field is set. - */ - public boolean hasGcrDestination() { - return destinationCase_ == 3; - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - * - * @return The gcrDestination. - */ - public com.google.cloud.automl.v1beta1.GcrDestination getGcrDestination() { - if (gcrDestinationBuilder_ == null) { - if (destinationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.GcrDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 3) { - return gcrDestinationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - public Builder setGcrDestination(com.google.cloud.automl.v1beta1.GcrDestination value) { - if (gcrDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcrDestinationBuilder_.setMessage(value); - } - destinationCase_ = 3; - return this; - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - public Builder setGcrDestination( - com.google.cloud.automl.v1beta1.GcrDestination.Builder builderForValue) { - if (gcrDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcrDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 3; - return this; - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - public Builder mergeGcrDestination(com.google.cloud.automl.v1beta1.GcrDestination value) { - if (gcrDestinationBuilder_ == null) { - if (destinationCase_ == 3 - && destination_ - != com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.automl.v1beta1.GcrDestination.newBuilder( - (com.google.cloud.automl.v1beta1.GcrDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 3) { - gcrDestinationBuilder_.mergeFrom(value); - } - gcrDestinationBuilder_.setMessage(value); - } - destinationCase_ = 3; - return this; - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - public Builder clearGcrDestination() { - if (gcrDestinationBuilder_ == null) { - if (destinationCase_ == 3) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 3) { - destinationCase_ = 0; - destination_ = null; - } - gcrDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - public com.google.cloud.automl.v1beta1.GcrDestination.Builder getGcrDestinationBuilder() { - return getGcrDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - public com.google.cloud.automl.v1beta1.GcrDestinationOrBuilder getGcrDestinationOrBuilder() { - if ((destinationCase_ == 3) && (gcrDestinationBuilder_ != null)) { - return gcrDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.GcrDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The GCR location where model image is to be pushed to. This location
-     * may only be set for the following model formats:
-     *   "docker".
-     * The model image will be created under the given URI.
-     * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcrDestination, - com.google.cloud.automl.v1beta1.GcrDestination.Builder, - com.google.cloud.automl.v1beta1.GcrDestinationOrBuilder> - getGcrDestinationFieldBuilder() { - if (gcrDestinationBuilder_ == null) { - if (!(destinationCase_ == 3)) { - destination_ = com.google.cloud.automl.v1beta1.GcrDestination.getDefaultInstance(); - } - gcrDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcrDestination, - com.google.cloud.automl.v1beta1.GcrDestination.Builder, - com.google.cloud.automl.v1beta1.GcrDestinationOrBuilder>( - (com.google.cloud.automl.v1beta1.GcrDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 3; - onChanged(); - ; - return gcrDestinationBuilder_; - } - - private java.lang.Object modelFormat_ = ""; - /** - * - * - *
-     * The format in which the model must be exported. The available, and default,
-     * formats depend on the problem and model type (if given problem and type
-     * combination doesn't have a format listed, it means its models are not
-     * exportable):
-     * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-     *        mobile-high-accuracy-1:
-     *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-     *      "docker".
-     * *  For Image Classification mobile-core-ml-low-latency-1,
-     *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-     *      "core_ml" (default).
-     * Formats description:
-     * * 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.
-     * * docker - Used for Docker containers. Use the params field to customize
-     *            the container. The container is verified to work correctly on
-     *            ubuntu 16.04 operating system. See more at
-     *            [containers
-     * quickstart](https:
-     * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-     * * core_ml - Used for iOS mobile devices.
-     * 
- * - * string model_format = 4; - * - * @return The modelFormat. - */ - public java.lang.String getModelFormat() { - java.lang.Object ref = modelFormat_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - modelFormat_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The format in which the model must be exported. The available, and default,
-     * formats depend on the problem and model type (if given problem and type
-     * combination doesn't have a format listed, it means its models are not
-     * exportable):
-     * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-     *        mobile-high-accuracy-1:
-     *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-     *      "docker".
-     * *  For Image Classification mobile-core-ml-low-latency-1,
-     *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-     *      "core_ml" (default).
-     * Formats description:
-     * * 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.
-     * * docker - Used for Docker containers. Use the params field to customize
-     *            the container. The container is verified to work correctly on
-     *            ubuntu 16.04 operating system. See more at
-     *            [containers
-     * quickstart](https:
-     * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-     * * core_ml - Used for iOS mobile devices.
-     * 
- * - * string model_format = 4; - * - * @return The bytes for modelFormat. - */ - public com.google.protobuf.ByteString getModelFormatBytes() { - java.lang.Object ref = modelFormat_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - modelFormat_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The format in which the model must be exported. The available, and default,
-     * formats depend on the problem and model type (if given problem and type
-     * combination doesn't have a format listed, it means its models are not
-     * exportable):
-     * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-     *        mobile-high-accuracy-1:
-     *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-     *      "docker".
-     * *  For Image Classification mobile-core-ml-low-latency-1,
-     *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-     *      "core_ml" (default).
-     * Formats description:
-     * * 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.
-     * * docker - Used for Docker containers. Use the params field to customize
-     *            the container. The container is verified to work correctly on
-     *            ubuntu 16.04 operating system. See more at
-     *            [containers
-     * quickstart](https:
-     * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-     * * core_ml - Used for iOS mobile devices.
-     * 
- * - * string model_format = 4; - * - * @param value The modelFormat to set. - * @return This builder for chaining. - */ - public Builder setModelFormat(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - modelFormat_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The format in which the model must be exported. The available, and default,
-     * formats depend on the problem and model type (if given problem and type
-     * combination doesn't have a format listed, it means its models are not
-     * exportable):
-     * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-     *        mobile-high-accuracy-1:
-     *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-     *      "docker".
-     * *  For Image Classification mobile-core-ml-low-latency-1,
-     *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-     *      "core_ml" (default).
-     * Formats description:
-     * * 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.
-     * * docker - Used for Docker containers. Use the params field to customize
-     *            the container. The container is verified to work correctly on
-     *            ubuntu 16.04 operating system. See more at
-     *            [containers
-     * quickstart](https:
-     * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-     * * core_ml - Used for iOS mobile devices.
-     * 
- * - * string model_format = 4; - * - * @return This builder for chaining. - */ - public Builder clearModelFormat() { - - modelFormat_ = getDefaultInstance().getModelFormat(); - onChanged(); - return this; - } - /** - * - * - *
-     * The format in which the model must be exported. The available, and default,
-     * formats depend on the problem and model type (if given problem and type
-     * combination doesn't have a format listed, it means its models are not
-     * exportable):
-     * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-     *        mobile-high-accuracy-1:
-     *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-     *      "docker".
-     * *  For Image Classification mobile-core-ml-low-latency-1,
-     *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-     *      "core_ml" (default).
-     * Formats description:
-     * * 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.
-     * * docker - Used for Docker containers. Use the params field to customize
-     *            the container. The container is verified to work correctly on
-     *            ubuntu 16.04 operating system. See more at
-     *            [containers
-     * quickstart](https:
-     * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-     * * core_ml - Used for iOS mobile devices.
-     * 
- * - * string model_format = 4; - * - * @param value The bytes for modelFormat to set. - * @return This builder for chaining. - */ - public Builder setModelFormatBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - modelFormat_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - private com.google.protobuf.MapField - internalGetMutableParams() { - onChanged(); - ; - if (params_ == null) { - params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - } - if (!params_.isMutable()) { - params_ = params_.copy(); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-     * Additional model-type and format specific parameters describing the
-     * requirements for the to be exported model files, any string must be up to
-     * 25000 characters long.
-     *  * For `docker` format:
-     *     `cpu_architecture` - (string) "x86_64" (default).
-     *     `gpu_architecture` - (string) "none" (default), "nvidia".
-     * 
- * - * map<string, string> params = 2; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-     * Additional model-type and format specific parameters describing the
-     * requirements for the to be exported model files, any string must be up to
-     * 25000 characters long.
-     *  * For `docker` format:
-     *     `cpu_architecture` - (string) "x86_64" (default).
-     *     `gpu_architecture` - (string) "none" (default), "nvidia".
-     * 
- * - * map<string, string> params = 2; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-     * Additional model-type and format specific parameters describing the
-     * requirements for the to be exported model files, any string must be up to
-     * 25000 characters long.
-     *  * For `docker` format:
-     *     `cpu_architecture` - (string) "x86_64" (default).
-     *     `gpu_architecture` - (string) "none" (default), "nvidia".
-     * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Additional model-type and format specific parameters describing the
-     * requirements for the to be exported model files, any string must be up to
-     * 25000 characters long.
-     *  * For `docker` format:
-     *     `cpu_architecture` - (string) "x86_64" (default).
-     *     `gpu_architecture` - (string) "none" (default), "nvidia".
-     * 
- * - * map<string, string> params = 2; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearParams() { - internalGetMutableParams().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Additional model-type and format specific parameters describing the
-     * requirements for the to be exported model files, any string must be up to
-     * 25000 characters long.
-     *  * For `docker` format:
-     *     `cpu_architecture` - (string) "x86_64" (default).
-     *     `gpu_architecture` - (string) "none" (default), "nvidia".
-     * 
- * - * map<string, string> params = 2; - */ - public Builder removeParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableParams() { - return internalGetMutableParams().getMutableMap(); - } - /** - * - * - *
-     * Additional model-type and format specific parameters describing the
-     * requirements for the to be exported model files, any string must be up to
-     * 25000 characters long.
-     *  * For `docker` format:
-     *     `cpu_architecture` - (string) "x86_64" (default).
-     *     `gpu_architecture` - (string) "none" (default), "nvidia".
-     * 
- * - * map<string, string> params = 2; - */ - public Builder putParams(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Additional model-type and format specific parameters describing the
-     * requirements for the to be exported model files, any string must be up to
-     * 25000 characters long.
-     *  * For `docker` format:
-     *     `cpu_architecture` - (string) "x86_64" (default).
-     *     `gpu_architecture` - (string) "none" (default), "nvidia".
-     * 
- * - * map<string, string> params = 2; - */ - public Builder putAllParams(java.util.Map values) { - internalGetMutableParams().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.ModelExportOutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.ModelExportOutputConfig) - private static final com.google.cloud.automl.v1beta1.ModelExportOutputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.ModelExportOutputConfig(); - } - - public static com.google.cloud.automl.v1beta1.ModelExportOutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ModelExportOutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ModelExportOutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java deleted file mode 100644 index 810784ffd..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java +++ /dev/null @@ -1,280 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface ModelExportOutputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.ModelExportOutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Google Cloud Storage location where the model is to be written to.
-   * This location may only be set for the following model formats:
-   *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-   *  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.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - boolean hasGcsDestination(); - /** - * - * - *
-   * The Google Cloud Storage location where the model is to be written to.
-   * This location may only be set for the following model formats:
-   *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-   *  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.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination(); - /** - * - * - *
-   * The Google Cloud Storage location where the model is to be written to.
-   * This location may only be set for the following model formats:
-   *   "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml".
-   *  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.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - * - * - *
-   * The GCR location where model image is to be pushed to. This location
-   * may only be set for the following model formats:
-   *   "docker".
-   * The model image will be created under the given URI.
-   * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - * - * @return Whether the gcrDestination field is set. - */ - boolean hasGcrDestination(); - /** - * - * - *
-   * The GCR location where model image is to be pushed to. This location
-   * may only be set for the following model formats:
-   *   "docker".
-   * The model image will be created under the given URI.
-   * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - * - * @return The gcrDestination. - */ - com.google.cloud.automl.v1beta1.GcrDestination getGcrDestination(); - /** - * - * - *
-   * The GCR location where model image is to be pushed to. This location
-   * may only be set for the following model formats:
-   *   "docker".
-   * The model image will be created under the given URI.
-   * 
- * - * .google.cloud.automl.v1beta1.GcrDestination gcr_destination = 3; - */ - com.google.cloud.automl.v1beta1.GcrDestinationOrBuilder getGcrDestinationOrBuilder(); - - /** - * - * - *
-   * The format in which the model must be exported. The available, and default,
-   * formats depend on the problem and model type (if given problem and type
-   * combination doesn't have a format listed, it means its models are not
-   * exportable):
-   * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-   *        mobile-high-accuracy-1:
-   *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-   *      "docker".
-   * *  For Image Classification mobile-core-ml-low-latency-1,
-   *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-   *      "core_ml" (default).
-   * Formats description:
-   * * 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.
-   * * docker - Used for Docker containers. Use the params field to customize
-   *            the container. The container is verified to work correctly on
-   *            ubuntu 16.04 operating system. See more at
-   *            [containers
-   * quickstart](https:
-   * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-   * * core_ml - Used for iOS mobile devices.
-   * 
- * - * string model_format = 4; - * - * @return The modelFormat. - */ - java.lang.String getModelFormat(); - /** - * - * - *
-   * The format in which the model must be exported. The available, and default,
-   * formats depend on the problem and model type (if given problem and type
-   * combination doesn't have a format listed, it means its models are not
-   * exportable):
-   * *  For Image Classification mobile-low-latency-1, mobile-versatile-1,
-   *        mobile-high-accuracy-1:
-   *      "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js",
-   *      "docker".
-   * *  For Image Classification mobile-core-ml-low-latency-1,
-   *        mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1:
-   *      "core_ml" (default).
-   * Formats description:
-   * * 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.
-   * * docker - Used for Docker containers. Use the params field to customize
-   *            the container. The container is verified to work correctly on
-   *            ubuntu 16.04 operating system. See more at
-   *            [containers
-   * quickstart](https:
-   * //cloud.google.com/vision/automl/docs/containers-gcs-quickstart)
-   * * core_ml - Used for iOS mobile devices.
-   * 
- * - * string model_format = 4; - * - * @return The bytes for modelFormat. - */ - com.google.protobuf.ByteString getModelFormatBytes(); - - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - int getParamsCount(); - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - boolean containsParams(java.lang.String key); - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getParams(); - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - java.util.Map getParamsMap(); - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Additional model-type and format specific parameters describing the
-   * requirements for the to be exported model files, any string must be up to
-   * 25000 characters long.
-   *  * For `docker` format:
-   *     `cpu_architecture` - (string) "x86_64" (default).
-   *     `gpu_architecture` - (string) "none" (default), "nvidia".
-   * 
- * - * map<string, string> params = 2; - */ - java.lang.String getParamsOrThrow(java.lang.String key); - - public com.google.cloud.automl.v1beta1.ModelExportOutputConfig.DestinationCase - getDestinationCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelName.java deleted file mode 100644 index 5376c0f5e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelName.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.automl.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class ModelName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/models/{model}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String model; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getModel() { - return model; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private ModelName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - model = Preconditions.checkNotNull(builder.getModel()); - } - - public static ModelName of(String project, String location, String model) { - return newBuilder().setProject(project).setLocation(location).setModel(model).build(); - } - - public static String format(String project, String location, String model) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setModel(model) - .build() - .toString(); - } - - public static ModelName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "ModelName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("model")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList(values.size()); - for (ModelName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldMapBuilder.put("model", model); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate("project", project, "location", location, "model", model); - } - - /** Builder for ModelName. */ - public static class Builder { - - private String project; - private String location; - private String model; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getModel() { - return model; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setLocation(String location) { - this.location = location; - return this; - } - - public Builder setModel(String model) { - this.model = model; - return this; - } - - private Builder() {} - - private Builder(ModelName modelName) { - project = modelName.project; - location = modelName.location; - model = modelName.model; - } - - public ModelName build() { - return new ModelName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof ModelName) { - ModelName that = (ModelName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.model.equals(that.model)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= model.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOrBuilder.java deleted file mode 100644 index e63f75501..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOrBuilder.java +++ /dev/null @@ -1,582 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/model.proto - -package com.google.cloud.automl.v1beta1; - -public interface ModelOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Model) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Metadata for translation models.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - * - * @return Whether the translationModelMetadata field is set. - */ - boolean hasTranslationModelMetadata(); - /** - * - * - *
-   * Metadata for translation models.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - * - * @return The translationModelMetadata. - */ - com.google.cloud.automl.v1beta1.TranslationModelMetadata getTranslationModelMetadata(); - /** - * - * - *
-   * Metadata for translation models.
-   * 
- * - * .google.cloud.automl.v1beta1.TranslationModelMetadata translation_model_metadata = 15; - * - */ - com.google.cloud.automl.v1beta1.TranslationModelMetadataOrBuilder - getTranslationModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for image classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - * - * @return Whether the imageClassificationModelMetadata field is set. - */ - boolean hasImageClassificationModelMetadata(); - /** - * - * - *
-   * Metadata for image classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - * - * @return The imageClassificationModelMetadata. - */ - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadata - getImageClassificationModelMetadata(); - /** - * - * - *
-   * Metadata for image classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageClassificationModelMetadata image_classification_model_metadata = 13; - * - */ - com.google.cloud.automl.v1beta1.ImageClassificationModelMetadataOrBuilder - getImageClassificationModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for text classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - * - * @return Whether the textClassificationModelMetadata field is set. - */ - boolean hasTextClassificationModelMetadata(); - /** - * - * - *
-   * Metadata for text classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - * - * @return The textClassificationModelMetadata. - */ - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - getTextClassificationModelMetadata(); - /** - * - * - *
-   * Metadata for text classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextClassificationModelMetadata text_classification_model_metadata = 14; - * - */ - com.google.cloud.automl.v1beta1.TextClassificationModelMetadataOrBuilder - getTextClassificationModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for image object detection models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - * - * @return Whether the imageObjectDetectionModelMetadata field is set. - */ - boolean hasImageObjectDetectionModelMetadata(); - /** - * - * - *
-   * Metadata for image object detection models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - * - * @return The imageObjectDetectionModelMetadata. - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata - getImageObjectDetectionModelMetadata(); - /** - * - * - *
-   * Metadata for image object detection models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - * - */ - com.google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadataOrBuilder - getImageObjectDetectionModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for video classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - * - * @return Whether the videoClassificationModelMetadata field is set. - */ - boolean hasVideoClassificationModelMetadata(); - /** - * - * - *
-   * Metadata for video classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - * - * @return The videoClassificationModelMetadata. - */ - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - getVideoClassificationModelMetadata(); - /** - * - * - *
-   * Metadata for video classification models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoClassificationModelMetadata video_classification_model_metadata = 23; - * - */ - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadataOrBuilder - getVideoClassificationModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for video object tracking models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - * - * @return Whether the videoObjectTrackingModelMetadata field is set. - */ - boolean hasVideoObjectTrackingModelMetadata(); - /** - * - * - *
-   * Metadata for video object tracking models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - * - * @return The videoObjectTrackingModelMetadata. - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - getVideoObjectTrackingModelMetadata(); - /** - * - * - *
-   * Metadata for video object tracking models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - * - */ - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataOrBuilder - getVideoObjectTrackingModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - * - * @return Whether the textExtractionModelMetadata field is set. - */ - boolean hasTextExtractionModelMetadata(); - /** - * - * - *
-   * Metadata for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - * - * @return The textExtractionModelMetadata. - */ - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata getTextExtractionModelMetadata(); - /** - * - * - *
-   * Metadata for text extraction models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextExtractionModelMetadata text_extraction_model_metadata = 19; - * - */ - com.google.cloud.automl.v1beta1.TextExtractionModelMetadataOrBuilder - getTextExtractionModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for Tables models.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - * - * @return Whether the tablesModelMetadata field is set. - */ - boolean hasTablesModelMetadata(); - /** - * - * - *
-   * Metadata for Tables models.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - * - * @return The tablesModelMetadata. - */ - com.google.cloud.automl.v1beta1.TablesModelMetadata getTablesModelMetadata(); - /** - * - * - *
-   * Metadata for Tables models.
-   * 
- * - * .google.cloud.automl.v1beta1.TablesModelMetadata tables_model_metadata = 24; - */ - com.google.cloud.automl.v1beta1.TablesModelMetadataOrBuilder getTablesModelMetadataOrBuilder(); - - /** - * - * - *
-   * Metadata for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - * - * @return Whether the textSentimentModelMetadata field is set. - */ - boolean hasTextSentimentModelMetadata(); - /** - * - * - *
-   * Metadata for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - * - * @return The textSentimentModelMetadata. - */ - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata getTextSentimentModelMetadata(); - /** - * - * - *
-   * Metadata for text sentiment models.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TextSentimentModelMetadata text_sentiment_model_metadata = 22; - * - */ - com.google.cloud.automl.v1beta1.TextSentimentModelMetadataOrBuilder - getTextSentimentModelMetadataOrBuilder(); - - /** - * - * - *
-   * Output only. Resource name of the model.
-   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. Resource name of the model.
-   * Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The name of the model to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9. It must start with a letter.
-   * 
- * - * string display_name = 2; - * - * @return The displayName. - */ - java.lang.String getDisplayName(); - /** - * - * - *
-   * Required. The name of the model to show in the interface. The name can be
-   * up to 32 characters long and can consist only of ASCII Latin letters A-Z
-   * and a-z, underscores
-   * (_), and ASCII digits 0-9. It must start with a letter.
-   * 
- * - * string display_name = 2; - * - * @return The bytes for displayName. - */ - com.google.protobuf.ByteString getDisplayNameBytes(); - - /** - * - * - *
-   * Required. The resource ID of the dataset used to create the model. The dataset must
-   * come from the same ancestor project and location.
-   * 
- * - * string dataset_id = 3; - * - * @return The datasetId. - */ - java.lang.String getDatasetId(); - /** - * - * - *
-   * Required. The resource ID of the dataset used to create the model. The dataset must
-   * come from the same ancestor project and location.
-   * 
- * - * string dataset_id = 3; - * - * @return The bytes for datasetId. - */ - com.google.protobuf.ByteString getDatasetIdBytes(); - - /** - * - * - *
-   * Output only. Timestamp when the model training finished  and can be used for prediction.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. Timestamp when the model training finished  and can be used for prediction.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. Timestamp when the model training finished  and can be used for prediction.
-   * 
- * - * .google.protobuf.Timestamp create_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Timestamp when this model was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. Timestamp when this model was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. Timestamp when this model was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 11; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Deployment state of the model. A model can only serve
-   * prediction requests after it gets deployed.
-   * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @return The enum numeric value on the wire for deploymentState. - */ - int getDeploymentStateValue(); - /** - * - * - *
-   * Output only. Deployment state of the model. A model can only serve
-   * prediction requests after it gets deployed.
-   * 
- * - * .google.cloud.automl.v1beta1.Model.DeploymentState deployment_state = 8; - * - * @return The deploymentState. - */ - com.google.cloud.automl.v1beta1.Model.DeploymentState getDeploymentState(); - - public com.google.cloud.automl.v1beta1.Model.ModelMetadataCase getModelMetadataCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOuterClass.java deleted file mode 100644 index 5fa242df7..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelOuterClass.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/model.proto - -package com.google.cloud.automl.v1beta1; - -public final class ModelOuterClass { - private ModelOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_Model_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_Model_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\'google/cloud/automl/v1beta1/model.prot" - + "o\022\033google.cloud.automl.v1beta1\032\031google/a" - + "pi/resource.proto\032\'google/cloud/automl/v" - + "1beta1/image.proto\032(google/cloud/automl/" - + "v1beta1/tables.proto\032&google/cloud/autom" - + "l/v1beta1/text.proto\032-google/cloud/autom" - + "l/v1beta1/translation.proto\032\'google/clou" - + "d/automl/v1beta1/video.proto\032\037google/pro" - + "tobuf/timestamp.proto\032\034google/api/annota" - + "tions.proto\"\314\n\n\005Model\022[\n\032translation_mod" - + "el_metadata\030\017 \001(\01325.google.cloud.automl." - + "v1beta1.TranslationModelMetadataH\000\022l\n#im" - + "age_classification_model_metadata\030\r \001(\0132" - + "=.google.cloud.automl.v1beta1.ImageClass" - + "ificationModelMetadataH\000\022j\n\"text_classif" - + "ication_model_metadata\030\016 \001(\0132<.google.cl" - + "oud.automl.v1beta1.TextClassificationMod" - + "elMetadataH\000\022o\n%image_object_detection_m" - + "odel_metadata\030\024 \001(\0132>.google.cloud.autom" - + "l.v1beta1.ImageObjectDetectionModelMetad" - + "ataH\000\022l\n#video_classification_model_meta" - + "data\030\027 \001(\0132=.google.cloud.automl.v1beta1" - + ".VideoClassificationModelMetadataH\000\022m\n$v" - + "ideo_object_tracking_model_metadata\030\025 \001(" - + "\0132=.google.cloud.automl.v1beta1.VideoObj" - + "ectTrackingModelMetadataH\000\022b\n\036text_extra" - + "ction_model_metadata\030\023 \001(\01328.google.clou" - + "d.automl.v1beta1.TextExtractionModelMeta" - + "dataH\000\022Q\n\025tables_model_metadata\030\030 \001(\01320." - + "google.cloud.automl.v1beta1.TablesModelM" - + "etadataH\000\022`\n\035text_sentiment_model_metada" - + "ta\030\026 \001(\01327.google.cloud.automl.v1beta1.T" - + "extSentimentModelMetadataH\000\022\014\n\004name\030\001 \001(" - + "\t\022\024\n\014display_name\030\002 \001(\t\022\022\n\ndataset_id\030\003 " - + "\001(\t\022/\n\013create_time\030\007 \001(\0132\032.google.protob" - + "uf.Timestamp\022/\n\013update_time\030\013 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022L\n\020deployment_stat" - + "e\030\010 \001(\01622.google.cloud.automl.v1beta1.Mo" - + "del.DeploymentState\"Q\n\017DeploymentState\022 " - + "\n\034DEPLOYMENT_STATE_UNSPECIFIED\020\000\022\014\n\010DEPL" - + "OYED\020\001\022\016\n\nUNDEPLOYED\020\002:X\352AU\n\033automl.goog" - + "leapis.com/Model\0226projects/{project}/loc" - + "ations/{location}/models/{model}B\020\n\016mode" - + "l_metadataB\245\001\n\037com.google.cloud.automl.v" - + "1beta1P\001ZAgoogle.golang.org/genproto/goo" - + "gleapis/cloud/automl/v1beta1;automl\312\002\033Go" - + "ogle\\Cloud\\AutoMl\\V1beta1\352\002\036Google::Clou" - + "d::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.automl.v1beta1.ImageProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Tables.getDescriptor(), - com.google.cloud.automl.v1beta1.TextProto.getDescriptor(), - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(), - com.google.cloud.automl.v1beta1.VideoProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_Model_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_Model_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_Model_descriptor, - new java.lang.String[] { - "TranslationModelMetadata", - "ImageClassificationModelMetadata", - "TextClassificationModelMetadata", - "ImageObjectDetectionModelMetadata", - "VideoClassificationModelMetadata", - "VideoObjectTrackingModelMetadata", - "TextExtractionModelMetadata", - "TablesModelMetadata", - "TextSentimentModelMetadata", - "Name", - "DisplayName", - "DatasetId", - "CreateTime", - "UpdateTime", - "DeploymentState", - "ModelMetadata", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.automl.v1beta1.ImageProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Tables.getDescriptor(); - com.google.cloud.automl.v1beta1.TextProto.getDescriptor(); - com.google.cloud.automl.v1beta1.TranslationProto.getDescriptor(); - com.google.cloud.automl.v1beta1.VideoProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertex.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertex.java deleted file mode 100644 index fc72e5b5d..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertex.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/geometry.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A vertex represents a 2D point in the image.
- * The normalized vertex coordinates are between 0 to 1 fractions relative to
- * the original plane (image, video). E.g. if the plane (e.g. whole image) would
- * have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would
- * be at the position (1, 6) on that plane.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.NormalizedVertex} - */ -public final class NormalizedVertex extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.NormalizedVertex) - NormalizedVertexOrBuilder { - private static final long serialVersionUID = 0L; - // Use NormalizedVertex.newBuilder() to construct. - private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NormalizedVertex() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NormalizedVertex(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private NormalizedVertex( - 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: - { - x_ = input.readFloat(); - break; - } - case 21: - { - y_ = 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.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.NormalizedVertex.class, - com.google.cloud.automl.v1beta1.NormalizedVertex.Builder.class); - } - - public static final int X_FIELD_NUMBER = 1; - private float x_; - /** - * - * - *
-   * Required. Horizontal coordinate.
-   * 
- * - * float x = 1; - * - * @return The x. - */ - public float getX() { - return x_; - } - - public static final int Y_FIELD_NUMBER = 2; - private float y_; - /** - * - * - *
-   * Required. Vertical coordinate.
-   * 
- * - * float y = 2; - * - * @return The y. - */ - public float getY() { - return y_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (x_ != 0F) { - output.writeFloat(1, x_); - } - if (y_ != 0F) { - output.writeFloat(2, y_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (x_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, x_); - } - if (y_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, y_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.NormalizedVertex)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.NormalizedVertex other = - (com.google.cloud.automl.v1beta1.NormalizedVertex) obj; - - if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) - return false; - if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) - return false; - if (!unknownFields.equals(other.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) + X_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getX()); - hash = (37 * hash) + Y_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getY()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.NormalizedVertex prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 vertex represents a 2D point in the image.
-   * The normalized vertex coordinates are between 0 to 1 fractions relative to
-   * the original plane (image, video). E.g. if the plane (e.g. whole image) would
-   * have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would
-   * be at the position (1, 6) on that plane.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.NormalizedVertex} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.NormalizedVertex) - com.google.cloud.automl.v1beta1.NormalizedVertexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_NormalizedVertex_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.NormalizedVertex.class, - com.google.cloud.automl.v1beta1.NormalizedVertex.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.NormalizedVertex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - x_ = 0F; - - y_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Geometry - .internal_static_google_cloud_automl_v1beta1_NormalizedVertex_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.NormalizedVertex getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.NormalizedVertex.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.NormalizedVertex build() { - com.google.cloud.automl.v1beta1.NormalizedVertex result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.NormalizedVertex buildPartial() { - com.google.cloud.automl.v1beta1.NormalizedVertex result = - new com.google.cloud.automl.v1beta1.NormalizedVertex(this); - result.x_ = x_; - result.y_ = y_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.NormalizedVertex) { - return mergeFrom((com.google.cloud.automl.v1beta1.NormalizedVertex) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.NormalizedVertex other) { - if (other == com.google.cloud.automl.v1beta1.NormalizedVertex.getDefaultInstance()) - return this; - if (other.getX() != 0F) { - setX(other.getX()); - } - if (other.getY() != 0F) { - setY(other.getY()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.NormalizedVertex parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.NormalizedVertex) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float x_; - /** - * - * - *
-     * Required. Horizontal coordinate.
-     * 
- * - * float x = 1; - * - * @return The x. - */ - public float getX() { - return x_; - } - /** - * - * - *
-     * Required. Horizontal coordinate.
-     * 
- * - * float x = 1; - * - * @param value The x to set. - * @return This builder for chaining. - */ - public Builder setX(float value) { - - x_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Horizontal coordinate.
-     * 
- * - * float x = 1; - * - * @return This builder for chaining. - */ - public Builder clearX() { - - x_ = 0F; - onChanged(); - return this; - } - - private float y_; - /** - * - * - *
-     * Required. Vertical coordinate.
-     * 
- * - * float y = 2; - * - * @return The y. - */ - public float getY() { - return y_; - } - /** - * - * - *
-     * Required. Vertical coordinate.
-     * 
- * - * float y = 2; - * - * @param value The y to set. - * @return This builder for chaining. - */ - public Builder setY(float value) { - - y_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Vertical coordinate.
-     * 
- * - * float y = 2; - * - * @return This builder for chaining. - */ - public Builder clearY() { - - y_ = 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.automl.v1beta1.NormalizedVertex) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.NormalizedVertex) - private static final com.google.cloud.automl.v1beta1.NormalizedVertex DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.NormalizedVertex(); - } - - public static com.google.cloud.automl.v1beta1.NormalizedVertex getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NormalizedVertex parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new NormalizedVertex(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.NormalizedVertex getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertexOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertexOrBuilder.java deleted file mode 100644 index cef427423..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/NormalizedVertexOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/geometry.proto - -package com.google.cloud.automl.v1beta1; - -public interface NormalizedVertexOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.NormalizedVertex) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Horizontal coordinate.
-   * 
- * - * float x = 1; - * - * @return The x. - */ - float getX(); - - /** - * - * - *
-   * Required. Vertical coordinate.
-   * 
- * - * float y = 2; - * - * @return The y. - */ - float getY(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadata.java deleted file mode 100644 index 3b2154e44..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadata.java +++ /dev/null @@ -1,4659 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Metadata used across all long running operations returned by AutoML API.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.OperationMetadata} - */ -public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.OperationMetadata) - OperationMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use OperationMetadata.newBuilder() to construct. - private OperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OperationMetadata() { - partialFailures_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new OperationMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - partialFailures_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - partialFailures_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder subBuilder = null; - if (detailsCase_ == 8) { - subBuilder = - ((com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 8; - break; - } - case 82: - { - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder subBuilder = - null; - if (detailsCase_ == 10) { - subBuilder = - ((com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 10; - break; - } - case 104: - { - progressPercent_ = input.readInt32(); - break; - } - case 122: - { - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder subBuilder = null; - if (detailsCase_ == 15) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 15; - break; - } - case 130: - { - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder subBuilder = - null; - if (detailsCase_ == 16) { - subBuilder = - ((com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 16; - break; - } - case 170: - { - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder subBuilder = null; - if (detailsCase_ == 21) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 21; - break; - } - case 178: - { - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder subBuilder = - null; - if (detailsCase_ == 22) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 22; - break; - } - case 194: - { - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder subBuilder = - null; - if (detailsCase_ == 24) { - subBuilder = - ((com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 24; - break; - } - case 202: - { - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder subBuilder = - null; - if (detailsCase_ == 25) { - subBuilder = - ((com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 25; - break; - } - case 210: - { - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder - subBuilder = null; - if (detailsCase_ == 26) { - subBuilder = - ((com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - details_) - .toBuilder(); - } - details_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - details_); - details_ = subBuilder.buildPartial(); - } - detailsCase_ = 26; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (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.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.OperationMetadata.class, - com.google.cloud.automl.v1beta1.OperationMetadata.Builder.class); - } - - private int detailsCase_ = 0; - private java.lang.Object details_; - - public enum DetailsCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DELETE_DETAILS(8), - DEPLOY_MODEL_DETAILS(24), - UNDEPLOY_MODEL_DETAILS(25), - CREATE_MODEL_DETAILS(10), - IMPORT_DATA_DETAILS(15), - BATCH_PREDICT_DETAILS(16), - EXPORT_DATA_DETAILS(21), - EXPORT_MODEL_DETAILS(22), - EXPORT_EVALUATED_EXAMPLES_DETAILS(26), - DETAILS_NOT_SET(0); - private final int value; - - private DetailsCase(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 DetailsCase valueOf(int value) { - return forNumber(value); - } - - public static DetailsCase forNumber(int value) { - switch (value) { - case 8: - return DELETE_DETAILS; - case 24: - return DEPLOY_MODEL_DETAILS; - case 25: - return UNDEPLOY_MODEL_DETAILS; - case 10: - return CREATE_MODEL_DETAILS; - case 15: - return IMPORT_DATA_DETAILS; - case 16: - return BATCH_PREDICT_DETAILS; - case 21: - return EXPORT_DATA_DETAILS; - case 22: - return EXPORT_MODEL_DETAILS; - case 26: - return EXPORT_EVALUATED_EXAMPLES_DETAILS; - case 0: - return DETAILS_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DetailsCase getDetailsCase() { - return DetailsCase.forNumber(detailsCase_); - } - - public static final int DELETE_DETAILS_FIELD_NUMBER = 8; - /** - * - * - *
-   * Details of a Delete operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - * - * @return Whether the deleteDetails field is set. - */ - public boolean hasDeleteDetails() { - return detailsCase_ == 8; - } - /** - * - * - *
-   * Details of a Delete operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - * - * @return The deleteDetails. - */ - public com.google.cloud.automl.v1beta1.DeleteOperationMetadata getDeleteDetails() { - if (detailsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of a Delete operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - public com.google.cloud.automl.v1beta1.DeleteOperationMetadataOrBuilder - getDeleteDetailsOrBuilder() { - if (detailsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance(); - } - - public static final int DEPLOY_MODEL_DETAILS_FIELD_NUMBER = 24; - /** - * - * - *
-   * Details of a DeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - * - * @return Whether the deployModelDetails field is set. - */ - public boolean hasDeployModelDetails() { - return detailsCase_ == 24; - } - /** - * - * - *
-   * Details of a DeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - * - * @return The deployModelDetails. - */ - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadata getDeployModelDetails() { - if (detailsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of a DeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadataOrBuilder - getDeployModelDetailsOrBuilder() { - if (detailsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance(); - } - - public static final int UNDEPLOY_MODEL_DETAILS_FIELD_NUMBER = 25; - /** - * - * - *
-   * Details of an UndeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - * - * @return Whether the undeployModelDetails field is set. - */ - public boolean hasUndeployModelDetails() { - return detailsCase_ == 25; - } - /** - * - * - *
-   * Details of an UndeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - * - * @return The undeployModelDetails. - */ - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata getUndeployModelDetails() { - if (detailsCase_ == 25) { - return (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of an UndeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadataOrBuilder - getUndeployModelDetailsOrBuilder() { - if (detailsCase_ == 25) { - return (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance(); - } - - public static final int CREATE_MODEL_DETAILS_FIELD_NUMBER = 10; - /** - * - * - *
-   * Details of CreateModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - * - * @return Whether the createModelDetails field is set. - */ - public boolean hasCreateModelDetails() { - return detailsCase_ == 10; - } - /** - * - * - *
-   * Details of CreateModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - * - * @return The createModelDetails. - */ - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadata getCreateModelDetails() { - if (detailsCase_ == 10) { - return (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of CreateModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadataOrBuilder - getCreateModelDetailsOrBuilder() { - if (detailsCase_ == 10) { - return (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance(); - } - - public static final int IMPORT_DATA_DETAILS_FIELD_NUMBER = 15; - /** - * - * - *
-   * Details of ImportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - * @return Whether the importDataDetails field is set. - */ - public boolean hasImportDataDetails() { - return detailsCase_ == 15; - } - /** - * - * - *
-   * Details of ImportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - * @return The importDataDetails. - */ - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadata getImportDataDetails() { - if (detailsCase_ == 15) { - return (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of ImportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - */ - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadataOrBuilder - getImportDataDetailsOrBuilder() { - if (detailsCase_ == 15) { - return (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); - } - - public static final int BATCH_PREDICT_DETAILS_FIELD_NUMBER = 16; - /** - * - * - *
-   * Details of BatchPredict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - * - * @return Whether the batchPredictDetails field is set. - */ - public boolean hasBatchPredictDetails() { - return detailsCase_ == 16; - } - /** - * - * - *
-   * Details of BatchPredict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - * - * @return The batchPredictDetails. - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata getBatchPredictDetails() { - if (detailsCase_ == 16) { - return (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of BatchPredict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadataOrBuilder - getBatchPredictDetailsOrBuilder() { - if (detailsCase_ == 16) { - return (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance(); - } - - public static final int EXPORT_DATA_DETAILS_FIELD_NUMBER = 21; - /** - * - * - *
-   * Details of ExportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - * @return Whether the exportDataDetails field is set. - */ - public boolean hasExportDataDetails() { - return detailsCase_ == 21; - } - /** - * - * - *
-   * Details of ExportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - * @return The exportDataDetails. - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata getExportDataDetails() { - if (detailsCase_ == 21) { - return (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of ExportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadataOrBuilder - getExportDataDetailsOrBuilder() { - if (detailsCase_ == 21) { - return (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); - } - - public static final int EXPORT_MODEL_DETAILS_FIELD_NUMBER = 22; - /** - * - * - *
-   * Details of ExportModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - * - * @return Whether the exportModelDetails field is set. - */ - public boolean hasExportModelDetails() { - return detailsCase_ == 22; - } - /** - * - * - *
-   * Details of ExportModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - * - * @return The exportModelDetails. - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata getExportModelDetails() { - if (detailsCase_ == 22) { - return (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance(); - } - /** - * - * - *
-   * Details of ExportModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadataOrBuilder - getExportModelDetailsOrBuilder() { - if (detailsCase_ == 22) { - return (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance(); - } - - public static final int EXPORT_EVALUATED_EXAMPLES_DETAILS_FIELD_NUMBER = 26; - /** - * - * - *
-   * Details of ExportEvaluatedExamples operation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - * - * @return Whether the exportEvaluatedExamplesDetails field is set. - */ - public boolean hasExportEvaluatedExamplesDetails() { - return detailsCase_ == 26; - } - /** - * - * - *
-   * Details of ExportEvaluatedExamples operation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - * - * @return The exportEvaluatedExamplesDetails. - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - getExportEvaluatedExamplesDetails() { - if (detailsCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance(); - } - /** - * - * - *
-   * Details of ExportEvaluatedExamples operation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataOrBuilder - getExportEvaluatedExamplesDetailsOrBuilder() { - if (detailsCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance(); - } - - public static final int PROGRESS_PERCENT_FIELD_NUMBER = 13; - private int progressPercent_; - /** - * - * - *
-   * Output only. Progress of operation. Range: [0, 100].
-   * Not used currently.
-   * 
- * - * int32 progress_percent = 13; - * - * @return The progressPercent. - */ - public int getProgressPercent() { - return progressPercent_; - } - - public static final int PARTIAL_FAILURES_FIELD_NUMBER = 2; - private java.util.List partialFailures_; - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public java.util.List getPartialFailuresList() { - return partialFailures_; - } - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public java.util.List - getPartialFailuresOrBuilderList() { - return partialFailures_; - } - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public int getPartialFailuresCount() { - return partialFailures_.size(); - } - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public com.google.rpc.Status getPartialFailures(int index) { - return partialFailures_.get(index); - } - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { - return partialFailures_.get(index); - } - - public static final int CREATE_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return createTime_ != null; - } - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return getCreateTime(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4; - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4; - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < partialFailures_.size(); i++) { - output.writeMessage(2, partialFailures_.get(i)); - } - if (createTime_ != null) { - output.writeMessage(3, getCreateTime()); - } - if (updateTime_ != null) { - output.writeMessage(4, getUpdateTime()); - } - if (detailsCase_ == 8) { - output.writeMessage(8, (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_); - } - if (detailsCase_ == 10) { - output.writeMessage( - 10, (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_); - } - if (progressPercent_ != 0) { - output.writeInt32(13, progressPercent_); - } - if (detailsCase_ == 15) { - output.writeMessage( - 15, (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_); - } - if (detailsCase_ == 16) { - output.writeMessage( - 16, (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_); - } - if (detailsCase_ == 21) { - output.writeMessage( - 21, (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_); - } - if (detailsCase_ == 22) { - output.writeMessage( - 22, (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_); - } - if (detailsCase_ == 24) { - output.writeMessage( - 24, (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_); - } - if (detailsCase_ == 25) { - output.writeMessage( - 25, (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_); - } - if (detailsCase_ == 26) { - output.writeMessage( - 26, (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) details_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < partialFailures_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, partialFailures_.get(i)); - } - if (createTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); - } - if (detailsCase_ == 8) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_); - } - if (detailsCase_ == 10) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_); - } - if (progressPercent_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(13, progressPercent_); - } - if (detailsCase_ == 15) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 15, (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_); - } - if (detailsCase_ == 16) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 16, (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_); - } - if (detailsCase_ == 21) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 21, (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_); - } - if (detailsCase_ == 22) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 22, (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_); - } - if (detailsCase_ == 24) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 24, (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_); - } - if (detailsCase_ == 25) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 25, (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_); - } - if (detailsCase_ == 26) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 26, - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) details_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.OperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.OperationMetadata other = - (com.google.cloud.automl.v1beta1.OperationMetadata) obj; - - if (getProgressPercent() != other.getProgressPercent()) return false; - if (!getPartialFailuresList().equals(other.getPartialFailuresList())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getDetailsCase().equals(other.getDetailsCase())) return false; - switch (detailsCase_) { - case 8: - if (!getDeleteDetails().equals(other.getDeleteDetails())) return false; - break; - case 24: - if (!getDeployModelDetails().equals(other.getDeployModelDetails())) return false; - break; - case 25: - if (!getUndeployModelDetails().equals(other.getUndeployModelDetails())) return false; - break; - case 10: - if (!getCreateModelDetails().equals(other.getCreateModelDetails())) return false; - break; - case 15: - if (!getImportDataDetails().equals(other.getImportDataDetails())) return false; - break; - case 16: - if (!getBatchPredictDetails().equals(other.getBatchPredictDetails())) return false; - break; - case 21: - if (!getExportDataDetails().equals(other.getExportDataDetails())) return false; - break; - case 22: - if (!getExportModelDetails().equals(other.getExportModelDetails())) return false; - break; - case 26: - if (!getExportEvaluatedExamplesDetails().equals(other.getExportEvaluatedExamplesDetails())) - return false; - break; - case 0: - default: - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROGRESS_PERCENT_FIELD_NUMBER; - hash = (53 * hash) + getProgressPercent(); - if (getPartialFailuresCount() > 0) { - hash = (37 * hash) + PARTIAL_FAILURES_FIELD_NUMBER; - hash = (53 * hash) + getPartialFailuresList().hashCode(); - } - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - switch (detailsCase_) { - case 8: - hash = (37 * hash) + DELETE_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDeleteDetails().hashCode(); - break; - case 24: - hash = (37 * hash) + DEPLOY_MODEL_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getDeployModelDetails().hashCode(); - break; - case 25: - hash = (37 * hash) + UNDEPLOY_MODEL_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getUndeployModelDetails().hashCode(); - break; - case 10: - hash = (37 * hash) + CREATE_MODEL_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getCreateModelDetails().hashCode(); - break; - case 15: - hash = (37 * hash) + IMPORT_DATA_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getImportDataDetails().hashCode(); - break; - case 16: - hash = (37 * hash) + BATCH_PREDICT_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getBatchPredictDetails().hashCode(); - break; - case 21: - hash = (37 * hash) + EXPORT_DATA_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getExportDataDetails().hashCode(); - break; - case 22: - hash = (37 * hash) + EXPORT_MODEL_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getExportModelDetails().hashCode(); - break; - case 26: - hash = (37 * hash) + EXPORT_EVALUATED_EXAMPLES_DETAILS_FIELD_NUMBER; - hash = (53 * hash) + getExportEvaluatedExamplesDetails().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.OperationMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Metadata used across all long running operations returned by AutoML API.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.OperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.OperationMetadata) - com.google.cloud.automl.v1beta1.OperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_OperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.OperationMetadata.class, - com.google.cloud.automl.v1beta1.OperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.OperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPartialFailuresFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - progressPercent_ = 0; - - if (partialFailuresBuilder_ == null) { - partialFailures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - partialFailuresBuilder_.clear(); - } - if (createTimeBuilder_ == null) { - createTime_ = null; - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - detailsCase_ = 0; - details_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_OperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OperationMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.OperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OperationMetadata build() { - com.google.cloud.automl.v1beta1.OperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.OperationMetadata result = - new com.google.cloud.automl.v1beta1.OperationMetadata(this); - int from_bitField0_ = bitField0_; - if (detailsCase_ == 8) { - if (deleteDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = deleteDetailsBuilder_.build(); - } - } - if (detailsCase_ == 24) { - if (deployModelDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = deployModelDetailsBuilder_.build(); - } - } - if (detailsCase_ == 25) { - if (undeployModelDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = undeployModelDetailsBuilder_.build(); - } - } - if (detailsCase_ == 10) { - if (createModelDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = createModelDetailsBuilder_.build(); - } - } - if (detailsCase_ == 15) { - if (importDataDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = importDataDetailsBuilder_.build(); - } - } - if (detailsCase_ == 16) { - if (batchPredictDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = batchPredictDetailsBuilder_.build(); - } - } - if (detailsCase_ == 21) { - if (exportDataDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = exportDataDetailsBuilder_.build(); - } - } - if (detailsCase_ == 22) { - if (exportModelDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = exportModelDetailsBuilder_.build(); - } - } - if (detailsCase_ == 26) { - if (exportEvaluatedExamplesDetailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = exportEvaluatedExamplesDetailsBuilder_.build(); - } - } - result.progressPercent_ = progressPercent_; - 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(); - } - result.detailsCase_ = detailsCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.OperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.OperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.OperationMetadata other) { - if (other == com.google.cloud.automl.v1beta1.OperationMetadata.getDefaultInstance()) - return this; - if (other.getProgressPercent() != 0) { - setProgressPercent(other.getProgressPercent()); - } - if (partialFailuresBuilder_ == null) { - if (!other.partialFailures_.isEmpty()) { - if (partialFailures_.isEmpty()) { - partialFailures_ = other.partialFailures_; - bitField0_ = (bitField0_ & ~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()); - } - switch (other.getDetailsCase()) { - case DELETE_DETAILS: - { - mergeDeleteDetails(other.getDeleteDetails()); - break; - } - case DEPLOY_MODEL_DETAILS: - { - mergeDeployModelDetails(other.getDeployModelDetails()); - break; - } - case UNDEPLOY_MODEL_DETAILS: - { - mergeUndeployModelDetails(other.getUndeployModelDetails()); - break; - } - case CREATE_MODEL_DETAILS: - { - mergeCreateModelDetails(other.getCreateModelDetails()); - break; - } - case IMPORT_DATA_DETAILS: - { - mergeImportDataDetails(other.getImportDataDetails()); - break; - } - case BATCH_PREDICT_DETAILS: - { - mergeBatchPredictDetails(other.getBatchPredictDetails()); - break; - } - case EXPORT_DATA_DETAILS: - { - mergeExportDataDetails(other.getExportDataDetails()); - break; - } - case EXPORT_MODEL_DETAILS: - { - mergeExportModelDetails(other.getExportModelDetails()); - break; - } - case EXPORT_EVALUATED_EXAMPLES_DETAILS: - { - mergeExportEvaluatedExamplesDetails(other.getExportEvaluatedExamplesDetails()); - break; - } - case DETAILS_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.OperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.OperationMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int detailsCase_ = 0; - private java.lang.Object details_; - - public DetailsCase getDetailsCase() { - return DetailsCase.forNumber(detailsCase_); - } - - public Builder clearDetails() { - detailsCase_ = 0; - details_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DeleteOperationMetadata, - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.DeleteOperationMetadataOrBuilder> - deleteDetailsBuilder_; - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - * - * @return Whether the deleteDetails field is set. - */ - public boolean hasDeleteDetails() { - return detailsCase_ == 8; - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - * - * @return The deleteDetails. - */ - public com.google.cloud.automl.v1beta1.DeleteOperationMetadata getDeleteDetails() { - if (deleteDetailsBuilder_ == null) { - if (detailsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 8) { - return deleteDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - public Builder setDeleteDetails(com.google.cloud.automl.v1beta1.DeleteOperationMetadata value) { - if (deleteDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - deleteDetailsBuilder_.setMessage(value); - } - detailsCase_ = 8; - return this; - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - public Builder setDeleteDetails( - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder builderForValue) { - if (deleteDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - deleteDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 8; - return this; - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - public Builder mergeDeleteDetails( - com.google.cloud.automl.v1beta1.DeleteOperationMetadata value) { - if (deleteDetailsBuilder_ == null) { - if (detailsCase_ == 8 - && details_ - != com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 8) { - deleteDetailsBuilder_.mergeFrom(value); - } - deleteDetailsBuilder_.setMessage(value); - } - detailsCase_ = 8; - return this; - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - public Builder clearDeleteDetails() { - if (deleteDetailsBuilder_ == null) { - if (detailsCase_ == 8) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 8) { - detailsCase_ = 0; - details_ = null; - } - deleteDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - public com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder - getDeleteDetailsBuilder() { - return getDeleteDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - public com.google.cloud.automl.v1beta1.DeleteOperationMetadataOrBuilder - getDeleteDetailsOrBuilder() { - if ((detailsCase_ == 8) && (deleteDetailsBuilder_ != null)) { - return deleteDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 8) { - return (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of a Delete operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DeleteOperationMetadata, - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.DeleteOperationMetadataOrBuilder> - getDeleteDetailsFieldBuilder() { - if (deleteDetailsBuilder_ == null) { - if (!(detailsCase_ == 8)) { - details_ = com.google.cloud.automl.v1beta1.DeleteOperationMetadata.getDefaultInstance(); - } - deleteDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DeleteOperationMetadata, - com.google.cloud.automl.v1beta1.DeleteOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.DeleteOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.DeleteOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 8; - onChanged(); - ; - return deleteDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadataOrBuilder> - deployModelDetailsBuilder_; - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - * - * @return Whether the deployModelDetails field is set. - */ - public boolean hasDeployModelDetails() { - return detailsCase_ == 24; - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - * - * @return The deployModelDetails. - */ - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadata getDeployModelDetails() { - if (deployModelDetailsBuilder_ == null) { - if (detailsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 24) { - return deployModelDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - public Builder setDeployModelDetails( - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata value) { - if (deployModelDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - deployModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 24; - return this; - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - public Builder setDeployModelDetails( - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder builderForValue) { - if (deployModelDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - deployModelDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 24; - return this; - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - public Builder mergeDeployModelDetails( - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata value) { - if (deployModelDetailsBuilder_ == null) { - if (detailsCase_ == 24 - && details_ - != com.google.cloud.automl.v1beta1.DeployModelOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 24) { - deployModelDetailsBuilder_.mergeFrom(value); - } - deployModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 24; - return this; - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - public Builder clearDeployModelDetails() { - if (deployModelDetailsBuilder_ == null) { - if (detailsCase_ == 24) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 24) { - detailsCase_ = 0; - details_ = null; - } - deployModelDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder - getDeployModelDetailsBuilder() { - return getDeployModelDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - public com.google.cloud.automl.v1beta1.DeployModelOperationMetadataOrBuilder - getDeployModelDetailsOrBuilder() { - if ((detailsCase_ == 24) && (deployModelDetailsBuilder_ != null)) { - return deployModelDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 24) { - return (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of a DeployModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadataOrBuilder> - getDeployModelDetailsFieldBuilder() { - if (deployModelDetailsBuilder_ == null) { - if (!(detailsCase_ == 24)) { - details_ = - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.getDefaultInstance(); - } - deployModelDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.DeployModelOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.DeployModelOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 24; - onChanged(); - ; - return deployModelDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadataOrBuilder> - undeployModelDetailsBuilder_; - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - * - * @return Whether the undeployModelDetails field is set. - */ - public boolean hasUndeployModelDetails() { - return detailsCase_ == 25; - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - * - * @return The undeployModelDetails. - */ - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata - getUndeployModelDetails() { - if (undeployModelDetailsBuilder_ == null) { - if (detailsCase_ == 25) { - return (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 25) { - return undeployModelDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - public Builder setUndeployModelDetails( - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata value) { - if (undeployModelDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - undeployModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 25; - return this; - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - public Builder setUndeployModelDetails( - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder builderForValue) { - if (undeployModelDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - undeployModelDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 25; - return this; - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - public Builder mergeUndeployModelDetails( - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata value) { - if (undeployModelDetailsBuilder_ == null) { - if (detailsCase_ == 25 - && details_ - != com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 25) { - undeployModelDetailsBuilder_.mergeFrom(value); - } - undeployModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 25; - return this; - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - public Builder clearUndeployModelDetails() { - if (undeployModelDetailsBuilder_ == null) { - if (detailsCase_ == 25) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 25) { - detailsCase_ = 0; - details_ = null; - } - undeployModelDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder - getUndeployModelDetailsBuilder() { - return getUndeployModelDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadataOrBuilder - getUndeployModelDetailsOrBuilder() { - if ((detailsCase_ == 25) && (undeployModelDetailsBuilder_ != null)) { - return undeployModelDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 25) { - return (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of an UndeployModel operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadataOrBuilder> - getUndeployModelDetailsFieldBuilder() { - if (undeployModelDetailsBuilder_ == null) { - if (!(detailsCase_ == 25)) { - details_ = - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance(); - } - undeployModelDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 25; - onChanged(); - ; - return undeployModelDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadataOrBuilder> - createModelDetailsBuilder_; - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - * - * @return Whether the createModelDetails field is set. - */ - public boolean hasCreateModelDetails() { - return detailsCase_ == 10; - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - * - * @return The createModelDetails. - */ - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadata getCreateModelDetails() { - if (createModelDetailsBuilder_ == null) { - if (detailsCase_ == 10) { - return (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 10) { - return createModelDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - public Builder setCreateModelDetails( - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata value) { - if (createModelDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - createModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 10; - return this; - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - public Builder setCreateModelDetails( - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder builderForValue) { - if (createModelDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - createModelDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 10; - return this; - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - public Builder mergeCreateModelDetails( - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata value) { - if (createModelDetailsBuilder_ == null) { - if (detailsCase_ == 10 - && details_ - != com.google.cloud.automl.v1beta1.CreateModelOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 10) { - createModelDetailsBuilder_.mergeFrom(value); - } - createModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 10; - return this; - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - public Builder clearCreateModelDetails() { - if (createModelDetailsBuilder_ == null) { - if (detailsCase_ == 10) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 10) { - detailsCase_ = 0; - details_ = null; - } - createModelDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder - getCreateModelDetailsBuilder() { - return getCreateModelDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - public com.google.cloud.automl.v1beta1.CreateModelOperationMetadataOrBuilder - getCreateModelDetailsOrBuilder() { - if ((detailsCase_ == 10) && (createModelDetailsBuilder_ != null)) { - return createModelDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 10) { - return (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of CreateModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadataOrBuilder> - getCreateModelDetailsFieldBuilder() { - if (createModelDetailsBuilder_ == null) { - if (!(detailsCase_ == 10)) { - details_ = - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.getDefaultInstance(); - } - createModelDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.CreateModelOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.CreateModelOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 10; - onChanged(); - ; - return createModelDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadataOrBuilder> - importDataDetailsBuilder_; - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - * - * @return Whether the importDataDetails field is set. - */ - public boolean hasImportDataDetails() { - return detailsCase_ == 15; - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - * - * @return The importDataDetails. - */ - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadata getImportDataDetails() { - if (importDataDetailsBuilder_ == null) { - if (detailsCase_ == 15) { - return (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 15) { - return importDataDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - */ - public Builder setImportDataDetails( - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata value) { - if (importDataDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - importDataDetailsBuilder_.setMessage(value); - } - detailsCase_ = 15; - return this; - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - */ - public Builder setImportDataDetails( - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder builderForValue) { - if (importDataDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - importDataDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 15; - return this; - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - */ - public Builder mergeImportDataDetails( - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata value) { - if (importDataDetailsBuilder_ == null) { - if (detailsCase_ == 15 - && details_ - != com.google.cloud.automl.v1beta1.ImportDataOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 15) { - importDataDetailsBuilder_.mergeFrom(value); - } - importDataDetailsBuilder_.setMessage(value); - } - detailsCase_ = 15; - return this; - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - */ - public Builder clearImportDataDetails() { - if (importDataDetailsBuilder_ == null) { - if (detailsCase_ == 15) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 15) { - detailsCase_ = 0; - details_ = null; - } - importDataDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - */ - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder - getImportDataDetailsBuilder() { - return getImportDataDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - */ - public com.google.cloud.automl.v1beta1.ImportDataOperationMetadataOrBuilder - getImportDataDetailsOrBuilder() { - if ((detailsCase_ == 15) && (importDataDetailsBuilder_ != null)) { - return importDataDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 15) { - return (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ImportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadataOrBuilder> - getImportDataDetailsFieldBuilder() { - if (importDataDetailsBuilder_ == null) { - if (!(detailsCase_ == 15)) { - details_ = - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.getDefaultInstance(); - } - importDataDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ImportDataOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ImportDataOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 15; - onChanged(); - ; - return importDataDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadataOrBuilder> - batchPredictDetailsBuilder_; - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - * - * @return Whether the batchPredictDetails field is set. - */ - public boolean hasBatchPredictDetails() { - return detailsCase_ == 16; - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - * - * @return The batchPredictDetails. - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata getBatchPredictDetails() { - if (batchPredictDetailsBuilder_ == null) { - if (detailsCase_ == 16) { - return (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 16) { - return batchPredictDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - public Builder setBatchPredictDetails( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata value) { - if (batchPredictDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - batchPredictDetailsBuilder_.setMessage(value); - } - detailsCase_ = 16; - return this; - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - public Builder setBatchPredictDetails( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder builderForValue) { - if (batchPredictDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - batchPredictDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 16; - return this; - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - public Builder mergeBatchPredictDetails( - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata value) { - if (batchPredictDetailsBuilder_ == null) { - if (detailsCase_ == 16 - && details_ - != com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 16) { - batchPredictDetailsBuilder_.mergeFrom(value); - } - batchPredictDetailsBuilder_.setMessage(value); - } - detailsCase_ = 16; - return this; - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - public Builder clearBatchPredictDetails() { - if (batchPredictDetailsBuilder_ == null) { - if (detailsCase_ == 16) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 16) { - detailsCase_ = 0; - details_ = null; - } - batchPredictDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder - getBatchPredictDetailsBuilder() { - return getBatchPredictDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - public com.google.cloud.automl.v1beta1.BatchPredictOperationMetadataOrBuilder - getBatchPredictDetailsOrBuilder() { - if ((detailsCase_ == 16) && (batchPredictDetailsBuilder_ != null)) { - return batchPredictDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 16) { - return (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of BatchPredict operation.
-     * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadataOrBuilder> - getBatchPredictDetailsFieldBuilder() { - if (batchPredictDetailsBuilder_ == null) { - if (!(detailsCase_ == 16)) { - details_ = - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.getDefaultInstance(); - } - batchPredictDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 16; - onChanged(); - ; - return batchPredictDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadataOrBuilder> - exportDataDetailsBuilder_; - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - * - * @return Whether the exportDataDetails field is set. - */ - public boolean hasExportDataDetails() { - return detailsCase_ == 21; - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - * - * @return The exportDataDetails. - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata getExportDataDetails() { - if (exportDataDetailsBuilder_ == null) { - if (detailsCase_ == 21) { - return (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 21) { - return exportDataDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - */ - public Builder setExportDataDetails( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata value) { - if (exportDataDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - exportDataDetailsBuilder_.setMessage(value); - } - detailsCase_ = 21; - return this; - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - */ - public Builder setExportDataDetails( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder builderForValue) { - if (exportDataDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - exportDataDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 21; - return this; - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - */ - public Builder mergeExportDataDetails( - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata value) { - if (exportDataDetailsBuilder_ == null) { - if (detailsCase_ == 21 - && details_ - != com.google.cloud.automl.v1beta1.ExportDataOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 21) { - exportDataDetailsBuilder_.mergeFrom(value); - } - exportDataDetailsBuilder_.setMessage(value); - } - detailsCase_ = 21; - return this; - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - */ - public Builder clearExportDataDetails() { - if (exportDataDetailsBuilder_ == null) { - if (detailsCase_ == 21) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 21) { - detailsCase_ = 0; - details_ = null; - } - exportDataDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder - getExportDataDetailsBuilder() { - return getExportDataDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - */ - public com.google.cloud.automl.v1beta1.ExportDataOperationMetadataOrBuilder - getExportDataDetailsOrBuilder() { - if ((detailsCase_ == 21) && (exportDataDetailsBuilder_ != null)) { - return exportDataDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 21) { - return (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ExportData operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadataOrBuilder> - getExportDataDetailsFieldBuilder() { - if (exportDataDetailsBuilder_ == null) { - if (!(detailsCase_ == 21)) { - details_ = - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.getDefaultInstance(); - } - exportDataDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportDataOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ExportDataOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 21; - onChanged(); - ; - return exportDataDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadataOrBuilder> - exportModelDetailsBuilder_; - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - * - * @return Whether the exportModelDetails field is set. - */ - public boolean hasExportModelDetails() { - return detailsCase_ == 22; - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - * - * @return The exportModelDetails. - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata getExportModelDetails() { - if (exportModelDetailsBuilder_ == null) { - if (detailsCase_ == 22) { - return (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance(); - } else { - if (detailsCase_ == 22) { - return exportModelDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - public Builder setExportModelDetails( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata value) { - if (exportModelDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - exportModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 22; - return this; - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - public Builder setExportModelDetails( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder builderForValue) { - if (exportModelDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - exportModelDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 22; - return this; - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - public Builder mergeExportModelDetails( - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata value) { - if (exportModelDetailsBuilder_ == null) { - if (detailsCase_ == 22 - && details_ - != com.google.cloud.automl.v1beta1.ExportModelOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 22) { - exportModelDetailsBuilder_.mergeFrom(value); - } - exportModelDetailsBuilder_.setMessage(value); - } - detailsCase_ = 22; - return this; - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - public Builder clearExportModelDetails() { - if (exportModelDetailsBuilder_ == null) { - if (detailsCase_ == 22) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 22) { - detailsCase_ = 0; - details_ = null; - } - exportModelDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder - getExportModelDetailsBuilder() { - return getExportModelDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - public com.google.cloud.automl.v1beta1.ExportModelOperationMetadataOrBuilder - getExportModelDetailsOrBuilder() { - if ((detailsCase_ == 22) && (exportModelDetailsBuilder_ != null)) { - return exportModelDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 22) { - return (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_; - } - return com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ExportModel operation.
-     * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadataOrBuilder> - getExportModelDetailsFieldBuilder() { - if (exportModelDetailsBuilder_ == null) { - if (!(detailsCase_ == 22)) { - details_ = - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.getDefaultInstance(); - } - exportModelDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportModelOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ExportModelOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 22; - onChanged(); - ; - return exportModelDetailsBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataOrBuilder> - exportEvaluatedExamplesDetailsBuilder_; - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - * - * @return Whether the exportEvaluatedExamplesDetails field is set. - */ - public boolean hasExportEvaluatedExamplesDetails() { - return detailsCase_ == 26; - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - * - * @return The exportEvaluatedExamplesDetails. - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - getExportEvaluatedExamplesDetails() { - if (exportEvaluatedExamplesDetailsBuilder_ == null) { - if (detailsCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - details_; - } - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance(); - } else { - if (detailsCase_ == 26) { - return exportEvaluatedExamplesDetailsBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - public Builder setExportEvaluatedExamplesDetails( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata value) { - if (exportEvaluatedExamplesDetailsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - details_ = value; - onChanged(); - } else { - exportEvaluatedExamplesDetailsBuilder_.setMessage(value); - } - detailsCase_ = 26; - return this; - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - public Builder setExportEvaluatedExamplesDetails( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder - builderForValue) { - if (exportEvaluatedExamplesDetailsBuilder_ == null) { - details_ = builderForValue.build(); - onChanged(); - } else { - exportEvaluatedExamplesDetailsBuilder_.setMessage(builderForValue.build()); - } - detailsCase_ = 26; - return this; - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - public Builder mergeExportEvaluatedExamplesDetails( - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata value) { - if (exportEvaluatedExamplesDetailsBuilder_ == null) { - if (detailsCase_ == 26 - && details_ - != com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance()) { - details_ = - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.newBuilder( - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - details_) - .mergeFrom(value) - .buildPartial(); - } else { - details_ = value; - } - onChanged(); - } else { - if (detailsCase_ == 26) { - exportEvaluatedExamplesDetailsBuilder_.mergeFrom(value); - } - exportEvaluatedExamplesDetailsBuilder_.setMessage(value); - } - detailsCase_ = 26; - return this; - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - public Builder clearExportEvaluatedExamplesDetails() { - if (exportEvaluatedExamplesDetailsBuilder_ == null) { - if (detailsCase_ == 26) { - detailsCase_ = 0; - details_ = null; - onChanged(); - } - } else { - if (detailsCase_ == 26) { - detailsCase_ = 0; - details_ = null; - } - exportEvaluatedExamplesDetailsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder - getExportEvaluatedExamplesDetailsBuilder() { - return getExportEvaluatedExamplesDetailsFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - public com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataOrBuilder - getExportEvaluatedExamplesDetailsOrBuilder() { - if ((detailsCase_ == 26) && (exportEvaluatedExamplesDetailsBuilder_ != null)) { - return exportEvaluatedExamplesDetailsBuilder_.getMessageOrBuilder(); - } else { - if (detailsCase_ == 26) { - return (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) - details_; - } - return com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance(); - } - } - /** - * - * - *
-     * Details of ExportEvaluatedExamples operation.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataOrBuilder> - getExportEvaluatedExamplesDetailsFieldBuilder() { - if (exportEvaluatedExamplesDetailsBuilder_ == null) { - if (!(detailsCase_ == 26)) { - details_ = - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - .getDefaultInstance(); - } - exportEvaluatedExamplesDetailsBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata.Builder, - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataOrBuilder>( - (com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata) details_, - getParentForChildren(), - isClean()); - details_ = null; - } - detailsCase_ = 26; - onChanged(); - ; - return exportEvaluatedExamplesDetailsBuilder_; - } - - private int progressPercent_; - /** - * - * - *
-     * Output only. Progress of operation. Range: [0, 100].
-     * Not used currently.
-     * 
- * - * int32 progress_percent = 13; - * - * @return The progressPercent. - */ - public int getProgressPercent() { - return progressPercent_; - } - /** - * - * - *
-     * Output only. Progress of operation. Range: [0, 100].
-     * Not used currently.
-     * 
- * - * int32 progress_percent = 13; - * - * @param value The progressPercent to set. - * @return This builder for chaining. - */ - public Builder setProgressPercent(int value) { - - progressPercent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Progress of operation. Range: [0, 100].
-     * Not used currently.
-     * 
- * - * int32 progress_percent = 13; - * - * @return This builder for chaining. - */ - public Builder clearProgressPercent() { - - progressPercent_ = 0; - onChanged(); - return this; - } - - 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 = 2; - */ - public java.util.List getPartialFailuresList() { - if (partialFailuresBuilder_ == null) { - return java.util.Collections.unmodifiableList(partialFailures_); - } else { - return partialFailuresBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public int getPartialFailuresCount() { - if (partialFailuresBuilder_ == null) { - return partialFailures_.size(); - } else { - return partialFailuresBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public com.google.rpc.Status getPartialFailures(int index) { - if (partialFailuresBuilder_ == null) { - return partialFailures_.get(index); - } else { - return partialFailuresBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder setPartialFailures(int index, com.google.rpc.Status value) { - if (partialFailuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialFailuresIsMutable(); - partialFailures_.set(index, value); - onChanged(); - } else { - partialFailuresBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder setPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.set(index, builderForValue.build()); - onChanged(); - } else { - partialFailuresBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder addPartialFailures(com.google.rpc.Status value) { - if (partialFailuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialFailuresIsMutable(); - partialFailures_.add(value); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder addPartialFailures(int index, com.google.rpc.Status value) { - if (partialFailuresBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePartialFailuresIsMutable(); - partialFailures_.add(index, value); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder addPartialFailures(com.google.rpc.Status.Builder builderForValue) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.add(builderForValue.build()); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder addPartialFailures(int index, com.google.rpc.Status.Builder builderForValue) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.add(index, builderForValue.build()); - onChanged(); - } else { - partialFailuresBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder addAllPartialFailures( - java.lang.Iterable values) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialFailures_); - onChanged(); - } else { - partialFailuresBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public Builder clearPartialFailures() { - if (partialFailuresBuilder_ == null) { - partialFailures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~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 = 2; - */ - public Builder removePartialFailures(int index) { - if (partialFailuresBuilder_ == null) { - ensurePartialFailuresIsMutable(); - partialFailures_.remove(index); - onChanged(); - } else { - partialFailuresBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public com.google.rpc.Status.Builder getPartialFailuresBuilder(int index) { - return getPartialFailuresFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { - if (partialFailuresBuilder_ == null) { - return partialFailures_.get(index); - } else { - return partialFailuresBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public java.util.List - getPartialFailuresOrBuilderList() { - if (partialFailuresBuilder_ != null) { - return partialFailuresBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(partialFailures_); - } - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public com.google.rpc.Status.Builder addPartialFailuresBuilder() { - return getPartialFailuresFieldBuilder() - .addBuilder(com.google.rpc.Status.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public com.google.rpc.Status.Builder addPartialFailuresBuilder(int index) { - return getPartialFailuresFieldBuilder() - .addBuilder(index, com.google.rpc.Status.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Partial failures encountered.
-     * E.g. single files that couldn't be read.
-     * This field should never exceed 20 entries.
-     * Status details field will contain standard GCP error details.
-     * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - public java.util.List getPartialFailuresBuilderList() { - return getPartialFailuresFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getPartialFailuresFieldBuilder() { - if (partialFailuresBuilder_ == null) { - partialFailuresBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.rpc.Status, - com.google.rpc.Status.Builder, - com.google.rpc.StatusOrBuilder>( - partialFailures_, - ((bitField0_ & 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 = 3; - * - * @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 = 3; - * - * @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 = 3; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - onChanged(); - } else { - createTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - onChanged(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (createTime_ != null) { - createTime_ = - com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); - } else { - createTime_ = value; - } - onChanged(); - } else { - createTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public Builder clearCreateTime() { - if (createTimeBuilder_ == null) { - createTime_ = null; - onChanged(); - } else { - createTime_ = null; - createTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. Time when the operation was created.
-     * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - * - * @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.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - * - * @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.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. Time when the operation was updated for the last time.
-     * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.OperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.OperationMetadata) - private static final com.google.cloud.automl.v1beta1.OperationMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.OperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.OperationMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OperationMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OperationMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadataOrBuilder.java deleted file mode 100644 index 939243f18..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OperationMetadataOrBuilder.java +++ /dev/null @@ -1,522 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface OperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.OperationMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Details of a Delete operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - * - * @return Whether the deleteDetails field is set. - */ - boolean hasDeleteDetails(); - /** - * - * - *
-   * Details of a Delete operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - * - * @return The deleteDetails. - */ - com.google.cloud.automl.v1beta1.DeleteOperationMetadata getDeleteDetails(); - /** - * - * - *
-   * Details of a Delete operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeleteOperationMetadata delete_details = 8; - */ - com.google.cloud.automl.v1beta1.DeleteOperationMetadataOrBuilder getDeleteDetailsOrBuilder(); - - /** - * - * - *
-   * Details of a DeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - * - * @return Whether the deployModelDetails field is set. - */ - boolean hasDeployModelDetails(); - /** - * - * - *
-   * Details of a DeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - * - * @return The deployModelDetails. - */ - com.google.cloud.automl.v1beta1.DeployModelOperationMetadata getDeployModelDetails(); - /** - * - * - *
-   * Details of a DeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.DeployModelOperationMetadata deploy_model_details = 24; - * - */ - com.google.cloud.automl.v1beta1.DeployModelOperationMetadataOrBuilder - getDeployModelDetailsOrBuilder(); - - /** - * - * - *
-   * Details of an UndeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - * - * @return Whether the undeployModelDetails field is set. - */ - boolean hasUndeployModelDetails(); - /** - * - * - *
-   * Details of an UndeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - * - * @return The undeployModelDetails. - */ - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata getUndeployModelDetails(); - /** - * - * - *
-   * Details of an UndeployModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.UndeployModelOperationMetadata undeploy_model_details = 25; - * - */ - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadataOrBuilder - getUndeployModelDetailsOrBuilder(); - - /** - * - * - *
-   * Details of CreateModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - * - * @return Whether the createModelDetails field is set. - */ - boolean hasCreateModelDetails(); - /** - * - * - *
-   * Details of CreateModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - * - * @return The createModelDetails. - */ - com.google.cloud.automl.v1beta1.CreateModelOperationMetadata getCreateModelDetails(); - /** - * - * - *
-   * Details of CreateModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.CreateModelOperationMetadata create_model_details = 10; - * - */ - com.google.cloud.automl.v1beta1.CreateModelOperationMetadataOrBuilder - getCreateModelDetailsOrBuilder(); - - /** - * - * - *
-   * Details of ImportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - * @return Whether the importDataDetails field is set. - */ - boolean hasImportDataDetails(); - /** - * - * - *
-   * Details of ImportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - * - * @return The importDataDetails. - */ - com.google.cloud.automl.v1beta1.ImportDataOperationMetadata getImportDataDetails(); - /** - * - * - *
-   * Details of ImportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ImportDataOperationMetadata import_data_details = 15; - */ - com.google.cloud.automl.v1beta1.ImportDataOperationMetadataOrBuilder - getImportDataDetailsOrBuilder(); - - /** - * - * - *
-   * Details of BatchPredict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - * - * @return Whether the batchPredictDetails field is set. - */ - boolean hasBatchPredictDetails(); - /** - * - * - *
-   * Details of BatchPredict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - * - * @return The batchPredictDetails. - */ - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadata getBatchPredictDetails(); - /** - * - * - *
-   * Details of BatchPredict operation.
-   * 
- * - * .google.cloud.automl.v1beta1.BatchPredictOperationMetadata batch_predict_details = 16; - * - */ - com.google.cloud.automl.v1beta1.BatchPredictOperationMetadataOrBuilder - getBatchPredictDetailsOrBuilder(); - - /** - * - * - *
-   * Details of ExportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - * @return Whether the exportDataDetails field is set. - */ - boolean hasExportDataDetails(); - /** - * - * - *
-   * Details of ExportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - * - * @return The exportDataDetails. - */ - com.google.cloud.automl.v1beta1.ExportDataOperationMetadata getExportDataDetails(); - /** - * - * - *
-   * Details of ExportData operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportDataOperationMetadata export_data_details = 21; - */ - com.google.cloud.automl.v1beta1.ExportDataOperationMetadataOrBuilder - getExportDataDetailsOrBuilder(); - - /** - * - * - *
-   * Details of ExportModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - * - * @return Whether the exportModelDetails field is set. - */ - boolean hasExportModelDetails(); - /** - * - * - *
-   * Details of ExportModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - * - * @return The exportModelDetails. - */ - com.google.cloud.automl.v1beta1.ExportModelOperationMetadata getExportModelDetails(); - /** - * - * - *
-   * Details of ExportModel operation.
-   * 
- * - * .google.cloud.automl.v1beta1.ExportModelOperationMetadata export_model_details = 22; - * - */ - com.google.cloud.automl.v1beta1.ExportModelOperationMetadataOrBuilder - getExportModelDetailsOrBuilder(); - - /** - * - * - *
-   * Details of ExportEvaluatedExamples operation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - * - * @return Whether the exportEvaluatedExamplesDetails field is set. - */ - boolean hasExportEvaluatedExamplesDetails(); - /** - * - * - *
-   * Details of ExportEvaluatedExamples operation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - * - * @return The exportEvaluatedExamplesDetails. - */ - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata - getExportEvaluatedExamplesDetails(); - /** - * - * - *
-   * Details of ExportEvaluatedExamples operation.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - * - */ - com.google.cloud.automl.v1beta1.ExportEvaluatedExamplesOperationMetadataOrBuilder - getExportEvaluatedExamplesDetailsOrBuilder(); - - /** - * - * - *
-   * Output only. Progress of operation. Range: [0, 100].
-   * Not used currently.
-   * 
- * - * int32 progress_percent = 13; - * - * @return The progressPercent. - */ - int getProgressPercent(); - - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - java.util.List getPartialFailuresList(); - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - com.google.rpc.Status getPartialFailures(int index); - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - int getPartialFailuresCount(); - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - java.util.List getPartialFailuresOrBuilderList(); - /** - * - * - *
-   * Output only. Partial failures encountered.
-   * E.g. single files that couldn't be read.
-   * This field should never exceed 20 entries.
-   * Status details field will contain standard GCP error details.
-   * 
- * - * repeated .google.rpc.Status partial_failures = 2; - */ - com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index); - - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. Time when the operation was created.
-   * 
- * - * .google.protobuf.Timestamp create_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4; - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4; - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. Time when the operation was updated for the last time.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4; - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - public com.google.cloud.automl.v1beta1.OperationMetadata.DetailsCase getDetailsCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Operations.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Operations.java deleted file mode 100644 index ed65a2044..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Operations.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public final class Operations { - private Operations() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_OperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_OperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/automl/v1beta1/operations" - + ".proto\022\033google.cloud.automl.v1beta1\032$goo" - + "gle/cloud/automl/v1beta1/io.proto\032\'googl" - + "e/cloud/automl/v1beta1/model.proto\0322goog" - + "le/cloud/automl/v1beta1/model_evaluation" - + ".proto\032\033google/protobuf/empty.proto\032\037goo" - + "gle/protobuf/timestamp.proto\032\027google/rpc" - + "/status.proto\032\034google/api/annotations.pr" - + "oto\"\213\010\n\021OperationMetadata\022N\n\016delete_deta" - + "ils\030\010 \001(\01324.google.cloud.automl.v1beta1." - + "DeleteOperationMetadataH\000\022Y\n\024deploy_mode" - + "l_details\030\030 \001(\01329.google.cloud.automl.v1" - + "beta1.DeployModelOperationMetadataH\000\022]\n\026" - + "undeploy_model_details\030\031 \001(\0132;.google.cl" - + "oud.automl.v1beta1.UndeployModelOperatio" - + "nMetadataH\000\022Y\n\024create_model_details\030\n \001(" - + "\01329.google.cloud.automl.v1beta1.CreateMo" - + "delOperationMetadataH\000\022W\n\023import_data_de" - + "tails\030\017 \001(\01328.google.cloud.automl.v1beta" - + "1.ImportDataOperationMetadataH\000\022[\n\025batch" - + "_predict_details\030\020 \001(\0132:.google.cloud.au" - + "toml.v1beta1.BatchPredictOperationMetada" - + "taH\000\022W\n\023export_data_details\030\025 \001(\01328.goog" - + "le.cloud.automl.v1beta1.ExportDataOperat" - + "ionMetadataH\000\022Y\n\024export_model_details\030\026 " - + "\001(\01329.google.cloud.automl.v1beta1.Export" - + "ModelOperationMetadataH\000\022r\n!export_evalu" - + "ated_examples_details\030\032 \001(\0132E.google.clo" - + "ud.automl.v1beta1.ExportEvaluatedExample" - + "sOperationMetadataH\000\022\030\n\020progress_percent" - + "\030\r \001(\005\022,\n\020partial_failures\030\002 \003(\0132\022.googl" - + "e.rpc.Status\022/\n\013create_time\030\003 \001(\0132\032.goog" - + "le.protobuf.Timestamp\022/\n\013update_time\030\004 \001" - + "(\0132\032.google.protobuf.TimestampB\t\n\007detail" - + "s\"\031\n\027DeleteOperationMetadata\"\036\n\034DeployMo" - + "delOperationMetadata\" \n\036UndeployModelOpe" - + "rationMetadata\"\036\n\034CreateModelOperationMe" - + "tadata\"\035\n\033ImportDataOperationMetadata\"\357\001" - + "\n\033ExportDataOperationMetadata\022b\n\013output_" - + "info\030\001 \001(\0132M.google.cloud.automl.v1beta1" - + ".ExportDataOperationMetadata.ExportDataO" - + "utputInfo\032l\n\024ExportDataOutputInfo\022\036\n\024gcs" - + "_output_directory\030\001 \001(\tH\000\022!\n\027bigquery_ou" - + "tput_dataset\030\002 \001(\tH\000B\021\n\017output_location\"" - + "\303\002\n\035BatchPredictOperationMetadata\022J\n\014inp" - + "ut_config\030\001 \001(\01324.google.cloud.automl.v1" - + "beta1.BatchPredictInputConfig\022f\n\013output_" - + "info\030\002 \001(\0132Q.google.cloud.automl.v1beta1" - + ".BatchPredictOperationMetadata.BatchPred" - + "ictOutputInfo\032n\n\026BatchPredictOutputInfo\022" - + "\036\n\024gcs_output_directory\030\001 \001(\tH\000\022!\n\027bigqu" - + "ery_output_dataset\030\002 \001(\tH\000B\021\n\017output_loc" - + "ation\"\273\001\n\034ExportModelOperationMetadata\022d" - + "\n\013output_info\030\002 \001(\0132O.google.cloud.autom" - + "l.v1beta1.ExportModelOperationMetadata.E" - + "xportModelOutputInfo\0325\n\025ExportModelOutpu" - + "tInfo\022\034\n\024gcs_output_directory\030\001 \001(\t\"\356\001\n(" - + "ExportEvaluatedExamplesOperationMetadata" - + "\022|\n\013output_info\030\002 \001(\0132g.google.cloud.aut" - + "oml.v1beta1.ExportEvaluatedExamplesOpera" - + "tionMetadata.ExportEvaluatedExamplesOutp" - + "utInfo\032D\n!ExportEvaluatedExamplesOutputI" - + "nfo\022\037\n\027bigquery_output_dataset\030\002 \001(\tB\245\001\n" - + "\037com.google.cloud.automl.v1beta1P\001ZAgoog" - + "le.golang.org/genproto/googleapis/cloud/" - + "automl/v1beta1;automl\312\002\033Google\\Cloud\\Aut" - + "oMl\\V1beta1\352\002\036Google::Cloud::AutoML::V1b" - + "eta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.Io.getDescriptor(), - com.google.cloud.automl.v1beta1.ModelOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_OperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_OperationMetadata_descriptor, - new java.lang.String[] { - "DeleteDetails", - "DeployModelDetails", - "UndeployModelDetails", - "CreateModelDetails", - "ImportDataDetails", - "BatchPredictDetails", - "ExportDataDetails", - "ExportModelDetails", - "ExportEvaluatedExamplesDetails", - "ProgressPercent", - "PartialFailures", - "CreateTime", - "UpdateTime", - "Details", - }); - internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DeleteOperationMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_DeployModelOperationMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_CreateModelOperationMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ImportDataOperationMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_descriptor, - new java.lang.String[] { - "OutputInfo", - }); - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_descriptor = - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportDataOperationMetadata_ExportDataOutputInfo_descriptor, - new java.lang.String[] { - "GcsOutputDirectory", "BigqueryOutputDataset", "OutputLocation", - }); - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_descriptor, - new java.lang.String[] { - "InputConfig", "OutputInfo", - }); - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_descriptor = - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_BatchPredictOperationMetadata_BatchPredictOutputInfo_descriptor, - new java.lang.String[] { - "GcsOutputDirectory", "BigqueryOutputDataset", "OutputLocation", - }); - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_descriptor, - new java.lang.String[] { - "OutputInfo", - }); - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_descriptor = - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportModelOperationMetadata_ExportModelOutputInfo_descriptor, - new java.lang.String[] { - "GcsOutputDirectory", - }); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_descriptor, - new java.lang.String[] { - "OutputInfo", - }); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_descriptor = - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_ExportEvaluatedExamplesOperationMetadata_ExportEvaluatedExamplesOutputInfo_descriptor, - new java.lang.String[] { - "BigqueryOutputDataset", - }); - com.google.cloud.automl.v1beta1.Io.getDescriptor(); - com.google.cloud.automl.v1beta1.ModelOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.ModelEvaluationOuterClass.getDescriptor(); - com.google.protobuf.EmptyProto.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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfig.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfig.java deleted file mode 100644 index 630c637cd..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfig.java +++ /dev/null @@ -1,1251 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * *  For Translation:
- *         CSV file `translation.csv`, with each line in format:
- *         ML_USE,GCS_FILE_PATH
- *         GCS_FILE_PATH leads to a .TSV file which describes examples that have
- *         given ML_USE, using the following row format per line:
- *         TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target
- *         language)
- *   *  For Tables:
- *         Output depends on whether the dataset was imported from GCS or
- *         BigQuery.
- *         GCS case:
- * [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination]
- *           must be set. Exported are CSV file(s) `tables_1.csv`,
- *           `tables_2.csv`,...,`tables_N.csv` with each having as header line
- *           the table's column names, and all other lines contain values for
- *           the header columns.
- *         BigQuery case:
- * [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
- *           pointing to a BigQuery project must be set. In the given project a
- *           new dataset will be created with name
- * `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>`
- *           where <automl-dataset-display-name> will be made
- *           BigQuery-dataset-name compatible (e.g. most special characters will
- *           become underscores), and timestamp will be in
- *           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that
- *           dataset a new table called `primary_table` will be created, and
- *           filled with precisely the same data as this obtained on import.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.OutputConfig} - */ -public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.OutputConfig) - OutputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OutputConfig() {} - - @java.lang.Override - @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: - { - com.google.cloud.automl.v1beta1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = - ((com.google.cloud.automl.v1beta1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.automl.v1beta1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder subBuilder = null; - if (destinationCase_ == 2) { - subBuilder = - ((com.google.cloud.automl.v1beta1.BigQueryDestination) destination_) - .toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BigQueryDestination.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.OutputConfig.class, - com.google.cloud.automl.v1beta1.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(1), - BIGQUERY_DESTINATION(2), - 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 2: - 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 = 1; - /** - * - * - *
-   * The Google Cloud Storage location where the output is to be written to.
-   * For Image Object Detection, Text Extraction, Video Classification and
-   * Tables, in the given directory a new directory will be created with name:
-   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-   * output will be written into that directory.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-   * The Google Cloud Storage location where the output is to be written to.
-   * For Image Object Detection, Text Extraction, Video Classification and
-   * Tables, in the given directory a new directory will be created with name:
-   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-   * output will be written into that directory.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - /** - * - * - *
-   * The Google Cloud Storage location where the output is to be written to.
-   * For Image Object Detection, Text Extraction, Video Classification and
-   * Tables, in the given directory a new directory will be created with name:
-   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-   * output will be written into that directory.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - - public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination() { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.automl.v1beta1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - output.writeMessage(2, (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.automl.v1beta1.GcsDestination) destination_); - } - if (destinationCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, (com.google.cloud.automl.v1beta1.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.automl.v1beta1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.OutputConfig other = - (com.google.cloud.automl.v1beta1.OutputConfig) obj; - - if (!getDestinationCase().equals(other.getDestinationCase())) return false; - switch (destinationCase_) { - case 1: - if (!getGcsDestination().equals(other.getGcsDestination())) return false; - break; - case 2: - 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(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 2: - 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.automl.v1beta1.OutputConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * *  For Translation:
-   *         CSV file `translation.csv`, with each line in format:
-   *         ML_USE,GCS_FILE_PATH
-   *         GCS_FILE_PATH leads to a .TSV file which describes examples that have
-   *         given ML_USE, using the following row format per line:
-   *         TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target
-   *         language)
-   *   *  For Tables:
-   *         Output depends on whether the dataset was imported from GCS or
-   *         BigQuery.
-   *         GCS case:
-   * [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination]
-   *           must be set. Exported are CSV file(s) `tables_1.csv`,
-   *           `tables_2.csv`,...,`tables_N.csv` with each having as header line
-   *           the table's column names, and all other lines contain values for
-   *           the header columns.
-   *         BigQuery case:
-   * [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
-   *           pointing to a BigQuery project must be set. In the given project a
-   *           new dataset will be created with name
-   * `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>`
-   *           where <automl-dataset-display-name> will be made
-   *           BigQuery-dataset-name compatible (e.g. most special characters will
-   *           become underscores), and timestamp will be in
-   *           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that
-   *           dataset a new table called `primary_table` will be created, and
-   *           filled with precisely the same data as this obtained on import.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.OutputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.OutputConfig) - com.google.cloud.automl.v1beta1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.OutputConfig.class, - com.google.cloud.automl.v1beta1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Io - .internal_static_google_cloud_automl_v1beta1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OutputConfig build() { - com.google.cloud.automl.v1beta1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OutputConfig buildPartial() { - com.google.cloud.automl.v1beta1.OutputConfig result = - new com.google.cloud.automl.v1beta1.OutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - if (destinationCase_ == 2) { - if (bigqueryDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = bigqueryDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.OutputConfig) { - return mergeFrom((com.google.cloud.automl.v1beta1.OutputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.OutputConfig other) { - if (other == com.google.cloud.automl.v1beta1.OutputConfig.getDefaultInstance()) return this; - 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.automl.v1beta1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder> - gcsDestinationBuilder_; - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return Whether the gcsDestination field is set. - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.automl.v1beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.automl.v1beta1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.automl.v1beta1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 - && destination_ - != com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.automl.v1beta1.GcsDestination.newBuilder( - (com.google.cloud.automl.v1beta1.GcsDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - gcsDestinationBuilder_.mergeFrom(value); - } - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - gcsDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.automl.v1beta1.GcsDestination) destination_; - } - return com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The Google Cloud Storage location where the output is to be written to.
-     * For Image Object Detection, Text Extraction, Video Classification and
-     * Tables, in the given directory a new directory will be created with name:
-     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-     * output will be written into that directory.
-     * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.automl.v1beta1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.GcsDestination, - com.google.cloud.automl.v1beta1.GcsDestination.Builder, - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder>( - (com.google.cloud.automl.v1beta1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged(); - ; - return gcsDestinationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder> - bigqueryDestinationBuilder_; - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - public boolean hasBigqueryDestination() { - return destinationCase_ == 2; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 2) { - return bigqueryDestinationBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder setBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder builderForValue) { - if (bigqueryDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - bigqueryDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder mergeBigqueryDestination( - com.google.cloud.automl.v1beta1.BigQueryDestination value) { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2 - && destination_ - != com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.automl.v1beta1.BigQueryDestination.newBuilder( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 2) { - bigqueryDestinationBuilder_.mergeFrom(value); - } - bigqueryDestinationBuilder_.setMessage(value); - } - destinationCase_ = 2; - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public Builder clearBigqueryDestination() { - if (bigqueryDestinationBuilder_ == null) { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 2) { - destinationCase_ = 0; - destination_ = null; - } - bigqueryDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestination.Builder - getBigqueryDestinationBuilder() { - return getBigqueryDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - public com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder - getBigqueryDestinationOrBuilder() { - if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { - return bigqueryDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 2) { - return (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_; - } - return com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * The BigQuery location where the output is to be written to.
-     * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder> - getBigqueryDestinationFieldBuilder() { - if (bigqueryDestinationBuilder_ == null) { - if (!(destinationCase_ == 2)) { - destination_ = com.google.cloud.automl.v1beta1.BigQueryDestination.getDefaultInstance(); - } - bigqueryDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BigQueryDestination, - com.google.cloud.automl.v1beta1.BigQueryDestination.Builder, - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder>( - (com.google.cloud.automl.v1beta1.BigQueryDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 2; - onChanged(); - ; - return bigqueryDestinationBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.OutputConfig) - private static final com.google.cloud.automl.v1beta1.OutputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.OutputConfig(); - } - - public static com.google.cloud.automl.v1beta1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfigOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfigOrBuilder.java deleted file mode 100644 index 82e55f6d1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/io.proto - -package com.google.cloud.automl.v1beta1; - -public interface OutputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The Google Cloud Storage location where the output is to be written to.
-   * For Image Object Detection, Text Extraction, Video Classification and
-   * Tables, in the given directory a new directory will be created with name:
-   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-   * output will be written into that directory.
-   * 
- * - * .google.cloud.automl.v1beta1.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.
-   * For Image Object Detection, Text Extraction, Video Classification and
-   * Tables, in the given directory a new directory will be created with name:
-   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-   * output will be written into that directory.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - * - * @return The gcsDestination. - */ - com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination(); - /** - * - * - *
-   * The Google Cloud Storage location where the output is to be written to.
-   * For Image Object Detection, Text Extraction, Video Classification and
-   * Tables, in the given directory a new directory will be created with name:
-   * export_data-<dataset-display-name>-<timestamp-of-export-call> where
-   * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
-   * output will be written into that directory.
-   * 
- * - * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return Whether the bigqueryDestination field is set. - */ - boolean hasBigqueryDestination(); - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - * - * @return The bigqueryDestination. - */ - com.google.cloud.automl.v1beta1.BigQueryDestination getBigqueryDestination(); - /** - * - * - *
-   * The BigQuery location where the output is to be written to.
-   * 
- * - * .google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2; - */ - com.google.cloud.automl.v1beta1.BigQueryDestinationOrBuilder getBigqueryDestinationOrBuilder(); - - public com.google.cloud.automl.v1beta1.OutputConfig.DestinationCase getDestinationCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequest.java deleted file mode 100644 index 2d451c300..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequest.java +++ /dev/null @@ -1,1447 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.PredictRequest} - */ -public final class PredictRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.PredictRequest) - PredictRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use PredictRequest.newBuilder() to construct. - private PredictRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PredictRequest() { - name_ = ""; - } - - @java.lang.Override - @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(); - - name_ = s; - break; - } - case 18: - { - com.google.cloud.automl.v1beta1.ExamplePayload.Builder subBuilder = null; - if (payload_ != null) { - subBuilder = payload_.toBuilder(); - } - payload_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExamplePayload.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(payload_); - payload_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = - com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put(params__.getKey(), params__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.PredictRequest.class, - com.google.cloud.automl.v1beta1.PredictRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Name of the model requested to serve the prediction.
-   * 
- * - * - * 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) { - 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 model requested to serve the prediction.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAYLOAD_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.ExamplePayload payload_; - /** - * - * - *
-   * Required. Payload to perform a prediction on. The payload must match the
-   * problem type that the model was trained to solve.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the payload field is set. - */ - public boolean hasPayload() { - return payload_ != null; - } - /** - * - * - *
-   * Required. Payload to perform a prediction on. The payload must match the
-   * problem type that the model was trained to solve.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The payload. - */ - public com.google.cloud.automl.v1beta1.ExamplePayload getPayload() { - return payload_ == null - ? com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance() - : payload_; - } - /** - * - * - *
-   * Required. Payload to perform a prediction on. The payload must match the
-   * problem type that the model was trained to solve.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder getPayloadOrBuilder() { - return getPayload(); - } - - public static final int PARAMS_FIELD_NUMBER = 3; - - private static final class ParamsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictRequest_ParamsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - public java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (payload_ != null) { - output.writeMessage(2, getPayload()); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 3); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (payload_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPayload()); - } - for (java.util.Map.Entry entry : - internalGetParams().getMap().entrySet()) { - com.google.protobuf.MapEntry params__ = - ParamsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, params__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.PredictRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.PredictRequest other = - (com.google.cloud.automl.v1beta1.PredictRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (hasPayload() != other.hasPayload()) return false; - if (hasPayload()) { - if (!getPayload().equals(other.getPayload())) return false; - } - if (!internalGetParams().equals(other.internalGetParams())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasPayload()) { - hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getPayload().hashCode(); - } - if (!internalGetParams().getMap().isEmpty()) { - hash = (37 * hash) + PARAMS_FIELD_NUMBER; - hash = (53 * hash) + internalGetParams().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.PredictRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.PredictRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.PredictRequest) - com.google.cloud.automl.v1beta1.PredictRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictRequest_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 3: - return internalGetMutableParams(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.PredictRequest.class, - com.google.cloud.automl.v1beta1.PredictRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.PredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (payloadBuilder_ == null) { - payload_ = null; - } else { - payload_ = null; - payloadBuilder_ = null; - } - internalGetMutableParams().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.PredictRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictRequest build() { - com.google.cloud.automl.v1beta1.PredictRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictRequest buildPartial() { - com.google.cloud.automl.v1beta1.PredictRequest result = - new com.google.cloud.automl.v1beta1.PredictRequest(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - if (payloadBuilder_ == null) { - result.payload_ = payload_; - } else { - result.payload_ = payloadBuilder_.build(); - } - result.params_ = internalGetParams(); - result.params_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.PredictRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.PredictRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.PredictRequest other) { - if (other == com.google.cloud.automl.v1beta1.PredictRequest.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasPayload()) { - mergePayload(other.getPayload()); - } - internalGetMutableParams().mergeFrom(other.internalGetParams()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.PredictRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.PredictRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Name of the model requested to serve the prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the prediction.
-     * 
- * - * - * 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. Name of the model requested to serve the prediction.
-     * 
- * - * - * 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.automl.v1beta1.ExamplePayload payload_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExamplePayload, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder, - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder> - payloadBuilder_; - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the payload field is set. - */ - public boolean hasPayload() { - return payloadBuilder_ != null || payload_ != null; - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The payload. - */ - public com.google.cloud.automl.v1beta1.ExamplePayload getPayload() { - if (payloadBuilder_ == null) { - return payload_ == null - ? com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance() - : payload_; - } else { - return payloadBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPayload(com.google.cloud.automl.v1beta1.ExamplePayload value) { - if (payloadBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - payload_ = value; - onChanged(); - } else { - payloadBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPayload( - com.google.cloud.automl.v1beta1.ExamplePayload.Builder builderForValue) { - if (payloadBuilder_ == null) { - payload_ = builderForValue.build(); - onChanged(); - } else { - payloadBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePayload(com.google.cloud.automl.v1beta1.ExamplePayload value) { - if (payloadBuilder_ == null) { - if (payload_ != null) { - payload_ = - com.google.cloud.automl.v1beta1.ExamplePayload.newBuilder(payload_) - .mergeFrom(value) - .buildPartial(); - } else { - payload_ = value; - } - onChanged(); - } else { - payloadBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearPayload() { - if (payloadBuilder_ == null) { - payload_ = null; - onChanged(); - } else { - payload_ = null; - payloadBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ExamplePayload.Builder getPayloadBuilder() { - - onChanged(); - return getPayloadFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder getPayloadOrBuilder() { - if (payloadBuilder_ != null) { - return payloadBuilder_.getMessageOrBuilder(); - } else { - return payload_ == null - ? com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance() - : payload_; - } - } - /** - * - * - *
-     * Required. Payload to perform a prediction on. The payload must match the
-     * problem type that the model was trained to solve.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExamplePayload, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder, - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder> - getPayloadFieldBuilder() { - if (payloadBuilder_ == null) { - payloadBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExamplePayload, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder, - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder>( - getPayload(), getParentForChildren(), isClean()); - payload_ = null; - } - return payloadBuilder_; - } - - private com.google.protobuf.MapField params_; - - private com.google.protobuf.MapField internalGetParams() { - if (params_ == null) { - return com.google.protobuf.MapField.emptyMapField(ParamsDefaultEntryHolder.defaultEntry); - } - return params_; - } - - private com.google.protobuf.MapField - internalGetMutableParams() { - onChanged(); - ; - if (params_ == null) { - params_ = com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - } - if (!params_.isMutable()) { - params_ = params_.copy(); - } - return params_; - } - - public int getParamsCount() { - return internalGetParams().getMap().size(); - } - /** - * - * - *
-     * Additional domain-specific parameters, any string must be up to 25000
-     * characters long.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *     makes predictions for an image, it will only produce results that have
-     *     at least this confidence score. The default is 0.5.
-     *  *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned in the response. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotation.
-     *        The default is false.
-     * 
- * - * map<string, string> params = 3; - */ - public boolean containsParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetParams().getMap().containsKey(key); - } - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getParams() { - return getParamsMap(); - } - /** - * - * - *
-     * Additional domain-specific parameters, any string must be up to 25000
-     * characters long.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *     makes predictions for an image, it will only produce results that have
-     *     at least this confidence score. The default is 0.5.
-     *  *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned in the response. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotation.
-     *        The default is false.
-     * 
- * - * map<string, string> params = 3; - */ - public java.util.Map getParamsMap() { - return internalGetParams().getMap(); - } - /** - * - * - *
-     * Additional domain-specific parameters, any string must be up to 25000
-     * characters long.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *     makes predictions for an image, it will only produce results that have
-     *     at least this confidence score. The default is 0.5.
-     *  *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned in the response. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotation.
-     *        The default is false.
-     * 
- * - * map<string, string> params = 3; - */ - public java.lang.String getParamsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Additional domain-specific parameters, any string must be up to 25000
-     * characters long.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *     makes predictions for an image, it will only produce results that have
-     *     at least this confidence score. The default is 0.5.
-     *  *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned in the response. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotation.
-     *        The default is false.
-     * 
- * - * map<string, string> params = 3; - */ - public java.lang.String getParamsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetParams().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearParams() { - internalGetMutableParams().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Additional domain-specific parameters, any string must be up to 25000
-     * characters long.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *     makes predictions for an image, it will only produce results that have
-     *     at least this confidence score. The default is 0.5.
-     *  *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned in the response. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotation.
-     *        The default is false.
-     * 
- * - * map<string, string> params = 3; - */ - public Builder removeParams(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableParams() { - return internalGetMutableParams().getMutableMap(); - } - /** - * - * - *
-     * Additional domain-specific parameters, any string must be up to 25000
-     * characters long.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *     makes predictions for an image, it will only produce results that have
-     *     at least this confidence score. The default is 0.5.
-     *  *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned in the response. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotation.
-     *        The default is false.
-     * 
- * - * map<string, string> params = 3; - */ - public Builder putParams(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableParams().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Additional domain-specific parameters, any string must be up to 25000
-     * characters long.
-     * *  For Image Classification:
-     *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-     *     makes predictions for an image, it will only produce results that have
-     *     at least this confidence score. The default is 0.5.
-     *  *  For Image Object Detection:
-     *    `score_threshold` - (float) When Model detects objects on the image,
-     *        it will only produce bounding boxes which have at least this
-     *        confidence score. Value in 0 to 1 range, default is 0.5.
-     *    `max_bounding_box_count` - (int64) No more than this number of bounding
-     *        boxes will be returned in the response. Default is 100, the
-     *        requested value may be limited by server.
-     * *  For Tables:
-     *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-     *        should be populated in the returned TablesAnnotation.
-     *        The default is false.
-     * 
- * - * map<string, string> params = 3; - */ - public Builder putAllParams(java.util.Map values) { - internalGetMutableParams().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.PredictRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.PredictRequest) - private static final com.google.cloud.automl.v1beta1.PredictRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.PredictRequest(); - } - - public static com.google.cloud.automl.v1beta1.PredictRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredictRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequestOrBuilder.java deleted file mode 100644 index f1641e9d1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictRequestOrBuilder.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -public interface PredictRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.PredictRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of the model requested to serve the prediction.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Name of the model requested to serve the prediction.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. Payload to perform a prediction on. The payload must match the
-   * problem type that the model was trained to solve.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the payload field is set. - */ - boolean hasPayload(); - /** - * - * - *
-   * Required. Payload to perform a prediction on. The payload must match the
-   * problem type that the model was trained to solve.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The payload. - */ - com.google.cloud.automl.v1beta1.ExamplePayload getPayload(); - /** - * - * - *
-   * Required. Payload to perform a prediction on. The payload must match the
-   * problem type that the model was trained to solve.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ExamplePayload payload = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder getPayloadOrBuilder(); - - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - int getParamsCount(); - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - boolean containsParams(java.lang.String key); - /** Use {@link #getParamsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getParams(); - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - java.util.Map getParamsMap(); - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - java.lang.String getParamsOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Additional domain-specific parameters, any string must be up to 25000
-   * characters long.
-   * *  For Image Classification:
-   *    `score_threshold` - (float) A value from 0.0 to 1.0. When the model
-   *     makes predictions for an image, it will only produce results that have
-   *     at least this confidence score. The default is 0.5.
-   *  *  For Image Object Detection:
-   *    `score_threshold` - (float) When Model detects objects on the image,
-   *        it will only produce bounding boxes which have at least this
-   *        confidence score. Value in 0 to 1 range, default is 0.5.
-   *    `max_bounding_box_count` - (int64) No more than this number of bounding
-   *        boxes will be returned in the response. Default is 100, the
-   *        requested value may be limited by server.
-   * *  For Tables:
-   *    feature_imp<span>ortan</span>ce - (boolean) Whether feature importance
-   *        should be populated in the returned TablesAnnotation.
-   *        The default is false.
-   * 
- * - * map<string, string> params = 3; - */ - java.lang.String getParamsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponse.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponse.java deleted file mode 100644 index c568dc9b0..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponse.java +++ /dev/null @@ -1,1741 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.PredictResponse} - */ -public final class PredictResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.PredictResponse) - PredictResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use PredictResponse.newBuilder() to construct. - private PredictResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PredictResponse() { - payload_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @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)) { - payload_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - payload_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.AnnotationPayload.parser(), - extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - metadata_ = - com.google.protobuf.MapField.newMapField( - MetadataDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.ExamplePayload.Builder subBuilder = null; - if (preprocessedInput_ != null) { - subBuilder = preprocessedInput_.toBuilder(); - } - preprocessedInput_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ExamplePayload.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(preprocessedInput_); - preprocessedInput_ = 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)) { - payload_ = java.util.Collections.unmodifiableList(payload_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.PredictResponse.class, - com.google.cloud.automl.v1beta1.PredictResponse.Builder.class); - } - - public static final int PAYLOAD_FIELD_NUMBER = 1; - private java.util.List payload_; - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public java.util.List getPayloadList() { - return payload_; - } - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public java.util.List - getPayloadOrBuilderList() { - return payload_; - } - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public int getPayloadCount() { - return payload_.size(); - } - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public com.google.cloud.automl.v1beta1.AnnotationPayload getPayload(int index) { - return payload_.get(index); - } - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index) { - return payload_.get(index); - } - - public static final int PREPROCESSED_INPUT_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.ExamplePayload preprocessedInput_; - /** - * - * - *
-   * The preprocessed example that AutoML actually makes prediction on.
-   * Empty if AutoML does not preprocess the input example.
-   * * For Text Extraction:
-   *   If the input is a .pdf file, the OCR'ed text will be provided in
-   *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-   * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - * - * @return Whether the preprocessedInput field is set. - */ - public boolean hasPreprocessedInput() { - return preprocessedInput_ != null; - } - /** - * - * - *
-   * The preprocessed example that AutoML actually makes prediction on.
-   * Empty if AutoML does not preprocess the input example.
-   * * For Text Extraction:
-   *   If the input is a .pdf file, the OCR'ed text will be provided in
-   *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-   * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - * - * @return The preprocessedInput. - */ - public com.google.cloud.automl.v1beta1.ExamplePayload getPreprocessedInput() { - return preprocessedInput_ == null - ? com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance() - : preprocessedInput_; - } - /** - * - * - *
-   * The preprocessed example that AutoML actually makes prediction on.
-   * Empty if AutoML does not preprocess the input example.
-   * * For Text Extraction:
-   *   If the input is a .pdf file, the OCR'ed text will be provided in
-   *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-   * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - public com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder getPreprocessedInputOrBuilder() { - return getPreprocessedInput(); - } - - public static final int METADATA_FIELD_NUMBER = 2; - - private static final class MetadataDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictResponse_MetadataEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { - if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); - } - return metadata_; - } - - public int getMetadataCount() { - return internalGetMetadata().getMap().size(); - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - public boolean containsMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetMetadata().getMap().containsKey(key); - } - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - public java.util.Map getMetadataMap() { - return internalGetMetadata().getMap(); - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - public java.lang.String getMetadataOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - public java.lang.String getMetadataOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < payload_.size(); i++) { - output.writeMessage(1, payload_.get(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 2); - if (preprocessedInput_ != null) { - output.writeMessage(3, getPreprocessedInput()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < payload_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, payload_.get(i)); - } - for (java.util.Map.Entry entry : - internalGetMetadata().getMap().entrySet()) { - com.google.protobuf.MapEntry metadata__ = - MetadataDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metadata__); - } - if (preprocessedInput_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPreprocessedInput()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.PredictResponse)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.PredictResponse other = - (com.google.cloud.automl.v1beta1.PredictResponse) obj; - - if (!getPayloadList().equals(other.getPayloadList())) return false; - if (hasPreprocessedInput() != other.hasPreprocessedInput()) return false; - if (hasPreprocessedInput()) { - if (!getPreprocessedInput().equals(other.getPreprocessedInput())) return false; - } - if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPayloadCount() > 0) { - hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getPayloadList().hashCode(); - } - if (hasPreprocessedInput()) { - hash = (37 * hash) + PREPROCESSED_INPUT_FIELD_NUMBER; - hash = (53 * hash) + getPreprocessedInput().hashCode(); - } - if (!internalGetMetadata().getMap().isEmpty()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + internalGetMetadata().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.PredictResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.PredictResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.PredictResponse) - com.google.cloud.automl.v1beta1.PredictResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictResponse_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 2: - return internalGetMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 2: - return internalGetMutableMetadata(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.PredictResponse.class, - com.google.cloud.automl.v1beta1.PredictResponse.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.PredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPayloadFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (payloadBuilder_ == null) { - payload_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - payloadBuilder_.clear(); - } - if (preprocessedInputBuilder_ == null) { - preprocessedInput_ = null; - } else { - preprocessedInput_ = null; - preprocessedInputBuilder_ = null; - } - internalGetMutableMetadata().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.PredictionServiceProto - .internal_static_google_cloud_automl_v1beta1_PredictResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictResponse getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.PredictResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictResponse build() { - com.google.cloud.automl.v1beta1.PredictResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictResponse buildPartial() { - com.google.cloud.automl.v1beta1.PredictResponse result = - new com.google.cloud.automl.v1beta1.PredictResponse(this); - int from_bitField0_ = bitField0_; - if (payloadBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - payload_ = java.util.Collections.unmodifiableList(payload_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.payload_ = payload_; - } else { - result.payload_ = payloadBuilder_.build(); - } - if (preprocessedInputBuilder_ == null) { - result.preprocessedInput_ = preprocessedInput_; - } else { - result.preprocessedInput_ = preprocessedInputBuilder_.build(); - } - result.metadata_ = internalGetMetadata(); - result.metadata_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.PredictResponse) { - return mergeFrom((com.google.cloud.automl.v1beta1.PredictResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.PredictResponse other) { - if (other == com.google.cloud.automl.v1beta1.PredictResponse.getDefaultInstance()) - return this; - if (payloadBuilder_ == null) { - if (!other.payload_.isEmpty()) { - if (payload_.isEmpty()) { - payload_ = other.payload_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePayloadIsMutable(); - payload_.addAll(other.payload_); - } - onChanged(); - } - } else { - if (!other.payload_.isEmpty()) { - if (payloadBuilder_.isEmpty()) { - payloadBuilder_.dispose(); - payloadBuilder_ = null; - payload_ = other.payload_; - bitField0_ = (bitField0_ & ~0x00000001); - payloadBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPayloadFieldBuilder() - : null; - } else { - payloadBuilder_.addAllMessages(other.payload_); - } - } - } - if (other.hasPreprocessedInput()) { - mergePreprocessedInput(other.getPreprocessedInput()); - } - internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.PredictResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.PredictResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List payload_ = - java.util.Collections.emptyList(); - - private void ensurePayloadIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - payload_ = - new java.util.ArrayList(payload_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.AnnotationPayload, - com.google.cloud.automl.v1beta1.AnnotationPayload.Builder, - com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder> - payloadBuilder_; - - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public java.util.List getPayloadList() { - if (payloadBuilder_ == null) { - return java.util.Collections.unmodifiableList(payload_); - } else { - return payloadBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public int getPayloadCount() { - if (payloadBuilder_ == null) { - return payload_.size(); - } else { - return payloadBuilder_.getCount(); - } - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public com.google.cloud.automl.v1beta1.AnnotationPayload getPayload(int index) { - if (payloadBuilder_ == null) { - return payload_.get(index); - } else { - return payloadBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder setPayload(int index, com.google.cloud.automl.v1beta1.AnnotationPayload value) { - if (payloadBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePayloadIsMutable(); - payload_.set(index, value); - onChanged(); - } else { - payloadBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder setPayload( - int index, com.google.cloud.automl.v1beta1.AnnotationPayload.Builder builderForValue) { - if (payloadBuilder_ == null) { - ensurePayloadIsMutable(); - payload_.set(index, builderForValue.build()); - onChanged(); - } else { - payloadBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder addPayload(com.google.cloud.automl.v1beta1.AnnotationPayload value) { - if (payloadBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePayloadIsMutable(); - payload_.add(value); - onChanged(); - } else { - payloadBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder addPayload(int index, com.google.cloud.automl.v1beta1.AnnotationPayload value) { - if (payloadBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePayloadIsMutable(); - payload_.add(index, value); - onChanged(); - } else { - payloadBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder addPayload( - com.google.cloud.automl.v1beta1.AnnotationPayload.Builder builderForValue) { - if (payloadBuilder_ == null) { - ensurePayloadIsMutable(); - payload_.add(builderForValue.build()); - onChanged(); - } else { - payloadBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder addPayload( - int index, com.google.cloud.automl.v1beta1.AnnotationPayload.Builder builderForValue) { - if (payloadBuilder_ == null) { - ensurePayloadIsMutable(); - payload_.add(index, builderForValue.build()); - onChanged(); - } else { - payloadBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder addAllPayload( - java.lang.Iterable values) { - if (payloadBuilder_ == null) { - ensurePayloadIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, payload_); - onChanged(); - } else { - payloadBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder clearPayload() { - if (payloadBuilder_ == null) { - payload_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - payloadBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public Builder removePayload(int index) { - if (payloadBuilder_ == null) { - ensurePayloadIsMutable(); - payload_.remove(index); - onChanged(); - } else { - payloadBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public com.google.cloud.automl.v1beta1.AnnotationPayload.Builder getPayloadBuilder(int index) { - return getPayloadFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder getPayloadOrBuilder( - int index) { - if (payloadBuilder_ == null) { - return payload_.get(index); - } else { - return payloadBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public java.util.List - getPayloadOrBuilderList() { - if (payloadBuilder_ != null) { - return payloadBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(payload_); - } - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public com.google.cloud.automl.v1beta1.AnnotationPayload.Builder addPayloadBuilder() { - return getPayloadFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.AnnotationPayload.getDefaultInstance()); - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public com.google.cloud.automl.v1beta1.AnnotationPayload.Builder addPayloadBuilder(int index) { - return getPayloadFieldBuilder() - .addBuilder( - index, com.google.cloud.automl.v1beta1.AnnotationPayload.getDefaultInstance()); - } - /** - * - * - *
-     * Prediction result.
-     * Translation and Text Sentiment will return precisely one payload.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - public java.util.List - getPayloadBuilderList() { - return getPayloadFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.AnnotationPayload, - com.google.cloud.automl.v1beta1.AnnotationPayload.Builder, - com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder> - getPayloadFieldBuilder() { - if (payloadBuilder_ == null) { - payloadBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.AnnotationPayload, - com.google.cloud.automl.v1beta1.AnnotationPayload.Builder, - com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder>( - payload_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - payload_ = null; - } - return payloadBuilder_; - } - - private com.google.cloud.automl.v1beta1.ExamplePayload preprocessedInput_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExamplePayload, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder, - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder> - preprocessedInputBuilder_; - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - * - * @return Whether the preprocessedInput field is set. - */ - public boolean hasPreprocessedInput() { - return preprocessedInputBuilder_ != null || preprocessedInput_ != null; - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - * - * @return The preprocessedInput. - */ - public com.google.cloud.automl.v1beta1.ExamplePayload getPreprocessedInput() { - if (preprocessedInputBuilder_ == null) { - return preprocessedInput_ == null - ? com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance() - : preprocessedInput_; - } else { - return preprocessedInputBuilder_.getMessage(); - } - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - public Builder setPreprocessedInput(com.google.cloud.automl.v1beta1.ExamplePayload value) { - if (preprocessedInputBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - preprocessedInput_ = value; - onChanged(); - } else { - preprocessedInputBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - public Builder setPreprocessedInput( - com.google.cloud.automl.v1beta1.ExamplePayload.Builder builderForValue) { - if (preprocessedInputBuilder_ == null) { - preprocessedInput_ = builderForValue.build(); - onChanged(); - } else { - preprocessedInputBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - public Builder mergePreprocessedInput(com.google.cloud.automl.v1beta1.ExamplePayload value) { - if (preprocessedInputBuilder_ == null) { - if (preprocessedInput_ != null) { - preprocessedInput_ = - com.google.cloud.automl.v1beta1.ExamplePayload.newBuilder(preprocessedInput_) - .mergeFrom(value) - .buildPartial(); - } else { - preprocessedInput_ = value; - } - onChanged(); - } else { - preprocessedInputBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - public Builder clearPreprocessedInput() { - if (preprocessedInputBuilder_ == null) { - preprocessedInput_ = null; - onChanged(); - } else { - preprocessedInput_ = null; - preprocessedInputBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - public com.google.cloud.automl.v1beta1.ExamplePayload.Builder getPreprocessedInputBuilder() { - - onChanged(); - return getPreprocessedInputFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - public com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder getPreprocessedInputOrBuilder() { - if (preprocessedInputBuilder_ != null) { - return preprocessedInputBuilder_.getMessageOrBuilder(); - } else { - return preprocessedInput_ == null - ? com.google.cloud.automl.v1beta1.ExamplePayload.getDefaultInstance() - : preprocessedInput_; - } - } - /** - * - * - *
-     * The preprocessed example that AutoML actually makes prediction on.
-     * Empty if AutoML does not preprocess the input example.
-     * * For Text Extraction:
-     *   If the input is a .pdf file, the OCR'ed text will be provided in
-     *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-     * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExamplePayload, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder, - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder> - getPreprocessedInputFieldBuilder() { - if (preprocessedInputBuilder_ == null) { - preprocessedInputBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ExamplePayload, - com.google.cloud.automl.v1beta1.ExamplePayload.Builder, - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder>( - getPreprocessedInput(), getParentForChildren(), isClean()); - preprocessedInput_ = null; - } - return preprocessedInputBuilder_; - } - - private com.google.protobuf.MapField metadata_; - - private com.google.protobuf.MapField internalGetMetadata() { - if (metadata_ == null) { - return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry); - } - return metadata_; - } - - private com.google.protobuf.MapField - internalGetMutableMetadata() { - onChanged(); - ; - if (metadata_ == null) { - metadata_ = - com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry); - } - if (!metadata_.isMutable()) { - metadata_ = metadata_.copy(); - } - return metadata_; - } - - public int getMetadataCount() { - return internalGetMetadata().getMap().size(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * * For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * * For Text Sentiment:
-     *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-     *      -1 maps to least positive sentiment, while 1 maps to the most positive
-     *      one and the higher the score, the more positive the sentiment in the
-     *      document is. Yet these values are relative to the training data, so
-     *      e.g. if all data was positive then -1 will be also positive (though
-     *      the least).
-     *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-     *      from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * map<string, string> metadata = 2; - */ - public boolean containsMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetMetadata().getMap().containsKey(key); - } - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getMetadata() { - return getMetadataMap(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * * For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * * For Text Sentiment:
-     *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-     *      -1 maps to least positive sentiment, while 1 maps to the most positive
-     *      one and the higher the score, the more positive the sentiment in the
-     *      document is. Yet these values are relative to the training data, so
-     *      e.g. if all data was positive then -1 will be also positive (though
-     *      the least).
-     *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-     *      from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * map<string, string> metadata = 2; - */ - public java.util.Map getMetadataMap() { - return internalGetMetadata().getMap(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * * For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * * For Text Sentiment:
-     *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-     *      -1 maps to least positive sentiment, while 1 maps to the most positive
-     *      one and the higher the score, the more positive the sentiment in the
-     *      document is. Yet these values are relative to the training data, so
-     *      e.g. if all data was positive then -1 will be also positive (though
-     *      the least).
-     *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-     *      from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * map<string, string> metadata = 2; - */ - public java.lang.String getMetadataOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * * For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * * For Text Sentiment:
-     *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-     *      -1 maps to least positive sentiment, while 1 maps to the most positive
-     *      one and the higher the score, the more positive the sentiment in the
-     *      document is. Yet these values are relative to the training data, so
-     *      e.g. if all data was positive then -1 will be also positive (though
-     *      the least).
-     *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-     *      from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * map<string, string> metadata = 2; - */ - public java.lang.String getMetadataOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetMetadata().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearMetadata() { - internalGetMutableMetadata().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * * For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * * For Text Sentiment:
-     *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-     *      -1 maps to least positive sentiment, while 1 maps to the most positive
-     *      one and the higher the score, the more positive the sentiment in the
-     *      document is. Yet these values are relative to the training data, so
-     *      e.g. if all data was positive then -1 will be also positive (though
-     *      the least).
-     *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-     *      from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * map<string, string> metadata = 2; - */ - public Builder removeMetadata(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableMetadata().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableMetadata() { - return internalGetMutableMetadata().getMutableMap(); - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * * For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * * For Text Sentiment:
-     *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-     *      -1 maps to least positive sentiment, while 1 maps to the most positive
-     *      one and the higher the score, the more positive the sentiment in the
-     *      document is. Yet these values are relative to the training data, so
-     *      e.g. if all data was positive then -1 will be also positive (though
-     *      the least).
-     *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-     *      from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * map<string, string> metadata = 2; - */ - public Builder putMetadata(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableMetadata().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Additional domain-specific prediction response metadata.
-     * * For Image Object Detection:
-     *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-     *      image could have been returned.
-     * * For Text Sentiment:
-     *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-     *      -1 maps to least positive sentiment, while 1 maps to the most positive
-     *      one and the higher the score, the more positive the sentiment in the
-     *      document is. Yet these values are relative to the training data, so
-     *      e.g. if all data was positive then -1 will be also positive (though
-     *      the least).
-     *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-     *      from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * map<string, string> metadata = 2; - */ - public Builder putAllMetadata(java.util.Map values) { - internalGetMutableMetadata().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.PredictResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.PredictResponse) - private static final com.google.cloud.automl.v1beta1.PredictResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.PredictResponse(); - } - - public static com.google.cloud.automl.v1beta1.PredictResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PredictResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.PredictResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponseOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponseOrBuilder.java deleted file mode 100644 index e5e695268..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictResponseOrBuilder.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -public interface PredictResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.PredictResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - java.util.List getPayloadList(); - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - com.google.cloud.automl.v1beta1.AnnotationPayload getPayload(int index); - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - int getPayloadCount(); - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - java.util.List - getPayloadOrBuilderList(); - /** - * - * - *
-   * Prediction result.
-   * Translation and Text Sentiment will return precisely one payload.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.AnnotationPayload payload = 1; - */ - com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder getPayloadOrBuilder(int index); - - /** - * - * - *
-   * The preprocessed example that AutoML actually makes prediction on.
-   * Empty if AutoML does not preprocess the input example.
-   * * For Text Extraction:
-   *   If the input is a .pdf file, the OCR'ed text will be provided in
-   *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-   * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - * - * @return Whether the preprocessedInput field is set. - */ - boolean hasPreprocessedInput(); - /** - * - * - *
-   * The preprocessed example that AutoML actually makes prediction on.
-   * Empty if AutoML does not preprocess the input example.
-   * * For Text Extraction:
-   *   If the input is a .pdf file, the OCR'ed text will be provided in
-   *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-   * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - * - * @return The preprocessedInput. - */ - com.google.cloud.automl.v1beta1.ExamplePayload getPreprocessedInput(); - /** - * - * - *
-   * The preprocessed example that AutoML actually makes prediction on.
-   * Empty if AutoML does not preprocess the input example.
-   * * For Text Extraction:
-   *   If the input is a .pdf file, the OCR'ed text will be provided in
-   *   [document_text][google.cloud.automl.v1beta1.Document.document_text].
-   * 
- * - * .google.cloud.automl.v1beta1.ExamplePayload preprocessed_input = 3; - */ - com.google.cloud.automl.v1beta1.ExamplePayloadOrBuilder getPreprocessedInputOrBuilder(); - - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - int getMetadataCount(); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - boolean containsMetadata(java.lang.String key); - /** Use {@link #getMetadataMap()} instead. */ - @java.lang.Deprecated - java.util.Map getMetadata(); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - java.util.Map getMetadataMap(); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue); - /** - * - * - *
-   * Additional domain-specific prediction response metadata.
-   * * For Image Object Detection:
-   *  `max_bounding_box_count` - (int64) At most that many bounding boxes per
-   *      image could have been returned.
-   * * For Text Sentiment:
-   *  `sentiment_score` - (float, deprecated) A value between -1 and 1,
-   *      -1 maps to least positive sentiment, while 1 maps to the most positive
-   *      one and the higher the score, the more positive the sentiment in the
-   *      document is. Yet these values are relative to the training data, so
-   *      e.g. if all data was positive then -1 will be also positive (though
-   *      the least).
-   *      The sentiment_score shouldn't be confused with "score" or "magnitude"
-   *      from the previous Natural Language Sentiment Analysis API.
-   * 
- * - * map<string, string> metadata = 2; - */ - java.lang.String getMetadataOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceProto.java deleted file mode 100644 index 6e6131562..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceProto.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/prediction_service.proto - -package com.google.cloud.automl.v1beta1; - -public final class PredictionServiceProto { - private PredictionServiceProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_PredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_PredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_PredictRequest_ParamsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_PredictRequest_ParamsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_PredictResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_PredictResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_PredictResponse_MetadataEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_PredictResponse_MetadataEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_ParamsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictRequest_ParamsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictResult_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictResult_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_BatchPredictResult_MetadataEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_BatchPredictResult_MetadataEntry_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n4google/cloud/automl/v1beta1/prediction" - + "_service.proto\022\033google.cloud.automl.v1be" - + "ta1\032\034google/api/annotations.proto\032\027googl" - + "e/api/client.proto\032\037google/api/field_beh" - + "avior.proto\032\031google/api/resource.proto\0324" - + "google/cloud/automl/v1beta1/annotation_p" - + "ayload.proto\032,google/cloud/automl/v1beta" - + "1/data_items.proto\032$google/cloud/automl/" - + "v1beta1/io.proto\032,google/cloud/automl/v1" - + "beta1/operations.proto\032#google/longrunni" - + "ng/operations.proto\"\376\001\n\016PredictRequest\0221" - + "\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033automl.googleapis." - + "com/Model\022A\n\007payload\030\002 \001(\0132+.google.clou" - + "d.automl.v1beta1.ExamplePayloadB\003\340A\002\022G\n\006" - + "params\030\003 \003(\01327.google.cloud.automl.v1bet" - + "a1.PredictRequest.ParamsEntry\032-\n\013ParamsE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\232\002\n" - + "\017PredictResponse\022?\n\007payload\030\001 \003(\0132..goog" - + "le.cloud.automl.v1beta1.AnnotationPayloa" - + "d\022G\n\022preprocessed_input\030\003 \001(\0132+.google.c" - + "loud.automl.v1beta1.ExamplePayload\022L\n\010me" - + "tadata\030\002 \003(\0132:.google.cloud.automl.v1bet" - + "a1.PredictResponse.MetadataEntry\032/\n\rMeta" - + "dataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" - + "\001\"\356\002\n\023BatchPredictRequest\0221\n\004name\030\001 \001(\tB" - + "#\340A\002\372A\035\n\033automl.googleapis.com/Model\022O\n\014" - + "input_config\030\003 \001(\01324.google.cloud.automl" - + ".v1beta1.BatchPredictInputConfigB\003\340A\002\022Q\n" - + "\routput_config\030\004 \001(\01325.google.cloud.auto" - + "ml.v1beta1.BatchPredictOutputConfigB\003\340A\002" - + "\022Q\n\006params\030\005 \003(\0132<.google.cloud.automl.v" - + "1beta1.BatchPredictRequest.ParamsEntryB\003" - + "\340A\002\032-\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001\"\226\001\n\022BatchPredictResult\022O\n\010met" - + "adata\030\001 \003(\0132=.google.cloud.automl.v1beta" - + "1.BatchPredictResult.MetadataEntry\032/\n\rMe" - + "tadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\0012\236\004\n\021PredictionService\022\276\001\n\007Predict\022+." - + "google.cloud.automl.v1beta1.PredictReque" - + "st\032,.google.cloud.automl.v1beta1.Predict" - + "Response\"X\202\323\344\223\002<\"7/v1beta1/{name=project" - + "s/*/locations/*/models/*}:predict:\001*\332A\023n" - + "ame,payload,params\022\374\001\n\014BatchPredict\0220.go" - + "ogle.cloud.automl.v1beta1.BatchPredictRe" - + "quest\032\035.google.longrunning.Operation\"\232\001\202" - + "\323\344\223\002A\" - * Output only. Root Mean Squared Error (RMSE). - * - * - * float root_mean_squared_error = 1; - * - * @return The rootMeanSquaredError. - */ - float getRootMeanSquaredError(); - - /** - * - * - *
-     * Output only. Mean Absolute Error (MAE).
-     * 
- * - * float mean_absolute_error = 2; - * - * @return The meanAbsoluteError. - */ - float getMeanAbsoluteError(); - - /** - * - * - *
-     * Output only. Mean absolute percentage error. Only set if all ground truth
-     * values are are positive.
-     * 
- * - * float mean_absolute_percentage_error = 3; - * - * @return The meanAbsolutePercentageError. - */ - float getMeanAbsolutePercentageError(); - - /** - * - * - *
-     * Output only. R squared.
-     * 
- * - * float r_squared = 4; - * - * @return The rSquared. - */ - float getRSquared(); - - /** - * - * - *
-     * Output only. Root mean squared log error.
-     * 
- * - * float root_mean_squared_log_error = 5; - * - * @return The rootMeanSquaredLogError. - */ - float getRootMeanSquaredLogError(); - } - /** - * - * - *
-   * Metrics for regression problems.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.RegressionEvaluationMetrics} - */ - public static final class RegressionEvaluationMetrics - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.RegressionEvaluationMetrics) - RegressionEvaluationMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use RegressionEvaluationMetrics.newBuilder() to construct. - private RegressionEvaluationMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private RegressionEvaluationMetrics() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new RegressionEvaluationMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RegressionEvaluationMetrics( - 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: - { - rootMeanSquaredError_ = input.readFloat(); - break; - } - case 21: - { - meanAbsoluteError_ = input.readFloat(); - break; - } - case 29: - { - meanAbsolutePercentageError_ = input.readFloat(); - break; - } - case 37: - { - rSquared_ = input.readFloat(); - break; - } - case 45: - { - rootMeanSquaredLogError_ = 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.automl.v1beta1.RegressionProto - .internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.RegressionProto - .internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder - .class); - } - - public static final int ROOT_MEAN_SQUARED_ERROR_FIELD_NUMBER = 1; - private float rootMeanSquaredError_; - /** - * - * - *
-     * Output only. Root Mean Squared Error (RMSE).
-     * 
- * - * float root_mean_squared_error = 1; - * - * @return The rootMeanSquaredError. - */ - public float getRootMeanSquaredError() { - return rootMeanSquaredError_; - } - - public static final int MEAN_ABSOLUTE_ERROR_FIELD_NUMBER = 2; - private float meanAbsoluteError_; - /** - * - * - *
-     * Output only. Mean Absolute Error (MAE).
-     * 
- * - * float mean_absolute_error = 2; - * - * @return The meanAbsoluteError. - */ - public float getMeanAbsoluteError() { - return meanAbsoluteError_; - } - - public static final int MEAN_ABSOLUTE_PERCENTAGE_ERROR_FIELD_NUMBER = 3; - private float meanAbsolutePercentageError_; - /** - * - * - *
-     * Output only. Mean absolute percentage error. Only set if all ground truth
-     * values are are positive.
-     * 
- * - * float mean_absolute_percentage_error = 3; - * - * @return The meanAbsolutePercentageError. - */ - public float getMeanAbsolutePercentageError() { - return meanAbsolutePercentageError_; - } - - public static final int R_SQUARED_FIELD_NUMBER = 4; - private float rSquared_; - /** - * - * - *
-     * Output only. R squared.
-     * 
- * - * float r_squared = 4; - * - * @return The rSquared. - */ - public float getRSquared() { - return rSquared_; - } - - public static final int ROOT_MEAN_SQUARED_LOG_ERROR_FIELD_NUMBER = 5; - private float rootMeanSquaredLogError_; - /** - * - * - *
-     * Output only. Root mean squared log error.
-     * 
- * - * float root_mean_squared_log_error = 5; - * - * @return The rootMeanSquaredLogError. - */ - public float getRootMeanSquaredLogError() { - return rootMeanSquaredLogError_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (rootMeanSquaredError_ != 0F) { - output.writeFloat(1, rootMeanSquaredError_); - } - if (meanAbsoluteError_ != 0F) { - output.writeFloat(2, meanAbsoluteError_); - } - if (meanAbsolutePercentageError_ != 0F) { - output.writeFloat(3, meanAbsolutePercentageError_); - } - if (rSquared_ != 0F) { - output.writeFloat(4, rSquared_); - } - if (rootMeanSquaredLogError_ != 0F) { - output.writeFloat(5, rootMeanSquaredLogError_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (rootMeanSquaredError_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, rootMeanSquaredError_); - } - if (meanAbsoluteError_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, meanAbsoluteError_); - } - if (meanAbsolutePercentageError_ != 0F) { - size += - com.google.protobuf.CodedOutputStream.computeFloatSize(3, meanAbsolutePercentageError_); - } - if (rSquared_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, rSquared_); - } - if (rootMeanSquaredLogError_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, rootMeanSquaredLogError_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics other = - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) obj; - - if (java.lang.Float.floatToIntBits(getRootMeanSquaredError()) - != java.lang.Float.floatToIntBits(other.getRootMeanSquaredError())) return false; - if (java.lang.Float.floatToIntBits(getMeanAbsoluteError()) - != java.lang.Float.floatToIntBits(other.getMeanAbsoluteError())) return false; - if (java.lang.Float.floatToIntBits(getMeanAbsolutePercentageError()) - != java.lang.Float.floatToIntBits(other.getMeanAbsolutePercentageError())) return false; - if (java.lang.Float.floatToIntBits(getRSquared()) - != java.lang.Float.floatToIntBits(other.getRSquared())) return false; - if (java.lang.Float.floatToIntBits(getRootMeanSquaredLogError()) - != java.lang.Float.floatToIntBits(other.getRootMeanSquaredLogError())) return false; - if (!unknownFields.equals(other.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) + ROOT_MEAN_SQUARED_ERROR_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRootMeanSquaredError()); - hash = (37 * hash) + MEAN_ABSOLUTE_ERROR_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMeanAbsoluteError()); - hash = (37 * hash) + MEAN_ABSOLUTE_PERCENTAGE_ERROR_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMeanAbsolutePercentageError()); - hash = (37 * hash) + R_SQUARED_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRSquared()); - hash = (37 * hash) + ROOT_MEAN_SQUARED_LOG_ERROR_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRootMeanSquaredLogError()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Metrics for regression problems.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.RegressionEvaluationMetrics} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.RegressionEvaluationMetrics) - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.RegressionProto - .internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.RegressionProto - .internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.Builder - .class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - rootMeanSquaredError_ = 0F; - - meanAbsoluteError_ = 0F; - - meanAbsolutePercentageError_ = 0F; - - rSquared_ = 0F; - - rootMeanSquaredLogError_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.RegressionProto - .internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics build() { - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - buildPartial() { - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics result = - new com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics(this); - result.rootMeanSquaredError_ = rootMeanSquaredError_; - result.meanAbsoluteError_ = meanAbsoluteError_; - result.meanAbsolutePercentageError_ = meanAbsolutePercentageError_; - result.rSquared_ = rSquared_; - result.rootMeanSquaredLogError_ = rootMeanSquaredLogError_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics other) { - if (other - == com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - .getDefaultInstance()) return this; - if (other.getRootMeanSquaredError() != 0F) { - setRootMeanSquaredError(other.getRootMeanSquaredError()); - } - if (other.getMeanAbsoluteError() != 0F) { - setMeanAbsoluteError(other.getMeanAbsoluteError()); - } - if (other.getMeanAbsolutePercentageError() != 0F) { - setMeanAbsolutePercentageError(other.getMeanAbsolutePercentageError()); - } - if (other.getRSquared() != 0F) { - setRSquared(other.getRSquared()); - } - if (other.getRootMeanSquaredLogError() != 0F) { - setRootMeanSquaredLogError(other.getRootMeanSquaredLogError()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float rootMeanSquaredError_; - /** - * - * - *
-       * Output only. Root Mean Squared Error (RMSE).
-       * 
- * - * float root_mean_squared_error = 1; - * - * @return The rootMeanSquaredError. - */ - public float getRootMeanSquaredError() { - return rootMeanSquaredError_; - } - /** - * - * - *
-       * Output only. Root Mean Squared Error (RMSE).
-       * 
- * - * float root_mean_squared_error = 1; - * - * @param value The rootMeanSquaredError to set. - * @return This builder for chaining. - */ - public Builder setRootMeanSquaredError(float value) { - - rootMeanSquaredError_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Root Mean Squared Error (RMSE).
-       * 
- * - * float root_mean_squared_error = 1; - * - * @return This builder for chaining. - */ - public Builder clearRootMeanSquaredError() { - - rootMeanSquaredError_ = 0F; - onChanged(); - return this; - } - - private float meanAbsoluteError_; - /** - * - * - *
-       * Output only. Mean Absolute Error (MAE).
-       * 
- * - * float mean_absolute_error = 2; - * - * @return The meanAbsoluteError. - */ - public float getMeanAbsoluteError() { - return meanAbsoluteError_; - } - /** - * - * - *
-       * Output only. Mean Absolute Error (MAE).
-       * 
- * - * float mean_absolute_error = 2; - * - * @param value The meanAbsoluteError to set. - * @return This builder for chaining. - */ - public Builder setMeanAbsoluteError(float value) { - - meanAbsoluteError_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Mean Absolute Error (MAE).
-       * 
- * - * float mean_absolute_error = 2; - * - * @return This builder for chaining. - */ - public Builder clearMeanAbsoluteError() { - - meanAbsoluteError_ = 0F; - onChanged(); - return this; - } - - private float meanAbsolutePercentageError_; - /** - * - * - *
-       * Output only. Mean absolute percentage error. Only set if all ground truth
-       * values are are positive.
-       * 
- * - * float mean_absolute_percentage_error = 3; - * - * @return The meanAbsolutePercentageError. - */ - public float getMeanAbsolutePercentageError() { - return meanAbsolutePercentageError_; - } - /** - * - * - *
-       * Output only. Mean absolute percentage error. Only set if all ground truth
-       * values are are positive.
-       * 
- * - * float mean_absolute_percentage_error = 3; - * - * @param value The meanAbsolutePercentageError to set. - * @return This builder for chaining. - */ - public Builder setMeanAbsolutePercentageError(float value) { - - meanAbsolutePercentageError_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Mean absolute percentage error. Only set if all ground truth
-       * values are are positive.
-       * 
- * - * float mean_absolute_percentage_error = 3; - * - * @return This builder for chaining. - */ - public Builder clearMeanAbsolutePercentageError() { - - meanAbsolutePercentageError_ = 0F; - onChanged(); - return this; - } - - private float rSquared_; - /** - * - * - *
-       * Output only. R squared.
-       * 
- * - * float r_squared = 4; - * - * @return The rSquared. - */ - public float getRSquared() { - return rSquared_; - } - /** - * - * - *
-       * Output only. R squared.
-       * 
- * - * float r_squared = 4; - * - * @param value The rSquared to set. - * @return This builder for chaining. - */ - public Builder setRSquared(float value) { - - rSquared_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. R squared.
-       * 
- * - * float r_squared = 4; - * - * @return This builder for chaining. - */ - public Builder clearRSquared() { - - rSquared_ = 0F; - onChanged(); - return this; - } - - private float rootMeanSquaredLogError_; - /** - * - * - *
-       * Output only. Root mean squared log error.
-       * 
- * - * float root_mean_squared_log_error = 5; - * - * @return The rootMeanSquaredLogError. - */ - public float getRootMeanSquaredLogError() { - return rootMeanSquaredLogError_; - } - /** - * - * - *
-       * Output only. Root mean squared log error.
-       * 
- * - * float root_mean_squared_log_error = 5; - * - * @param value The rootMeanSquaredLogError to set. - * @return This builder for chaining. - */ - public Builder setRootMeanSquaredLogError(float value) { - - rootMeanSquaredLogError_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Root mean squared log error.
-       * 
- * - * float root_mean_squared_log_error = 5; - * - * @return This builder for chaining. - */ - public Builder clearRootMeanSquaredLogError() { - - rootMeanSquaredLogError_ = 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.automl.v1beta1.RegressionEvaluationMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.RegressionEvaluationMetrics) - private static final com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics(); - } - - public static com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public RegressionEvaluationMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new RegressionEvaluationMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.RegressionProto.RegressionEvaluationMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/automl/v1beta1/regression" - + ".proto\022\033google.cloud.automl.v1beta1\032\034goo" - + "gle/api/annotations.proto\"\273\001\n\033Regression" - + "EvaluationMetrics\022\037\n\027root_mean_squared_e" - + "rror\030\001 \001(\002\022\033\n\023mean_absolute_error\030\002 \001(\002\022" - + "&\n\036mean_absolute_percentage_error\030\003 \001(\002\022" - + "\021\n\tr_squared\030\004 \001(\002\022#\n\033root_mean_squared_" - + "log_error\030\005 \001(\002B\264\001\n\037com.google.cloud.aut" - + "oml.v1beta1B\017RegressionProtoZAgoogle.gol" - + "ang.org/genproto/googleapis/cloud/automl" - + "/v1beta1;automl\312\002\033Google\\Cloud\\AutoMl\\V1" - + "beta1\352\002\036Google::Cloud::AutoML::V1beta1b\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_automl_v1beta1_RegressionEvaluationMetrics_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_RegressionEvaluationMetrics_descriptor, - new java.lang.String[] { - "RootMeanSquaredError", - "MeanAbsoluteError", - "MeanAbsolutePercentageError", - "RSquared", - "RootMeanSquaredLogError", - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Row.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Row.java deleted file mode 100644 index 6a3730b9a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Row.java +++ /dev/null @@ -1,1375 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A representation of a row in a relational table.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Row} - */ -public final class Row extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.Row) - RowOrBuilder { - private static final long serialVersionUID = 0L; - // Use Row.newBuilder() to construct. - private Row(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Row() { - columnSpecIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - values_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Row(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Row( - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - columnSpecIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - columnSpecIds_.add(s); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - values_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - values_.add(input.readMessage(com.google.protobuf.Value.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)) { - columnSpecIds_ = columnSpecIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Row_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Row_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Row.class, - com.google.cloud.automl.v1beta1.Row.Builder.class); - } - - public static final int COLUMN_SPEC_IDS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList columnSpecIds_; - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @return A list containing the columnSpecIds. - */ - public com.google.protobuf.ProtocolStringList getColumnSpecIdsList() { - return columnSpecIds_; - } - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @return The count of columnSpecIds. - */ - public int getColumnSpecIdsCount() { - return columnSpecIds_.size(); - } - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @param index The index of the element to return. - * @return The columnSpecIds at the given index. - */ - public java.lang.String getColumnSpecIds(int index) { - return columnSpecIds_.get(index); - } - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @param index The index of the value to return. - * @return The bytes of the columnSpecIds at the given index. - */ - public com.google.protobuf.ByteString getColumnSpecIdsBytes(int index) { - return columnSpecIds_.getByteString(index); - } - - public static final int VALUES_FIELD_NUMBER = 3; - private java.util.List values_; - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public java.util.List getValuesList() { - return values_; - } - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public java.util.List getValuesOrBuilderList() { - return values_; - } - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public int getValuesCount() { - return values_.size(); - } - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public com.google.protobuf.Value getValues(int index) { - return values_.get(index); - } - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public com.google.protobuf.ValueOrBuilder getValuesOrBuilder(int index) { - return values_.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 < columnSpecIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, columnSpecIds_.getRaw(i)); - } - for (int i = 0; i < values_.size(); i++) { - output.writeMessage(3, values_.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 < columnSpecIds_.size(); i++) { - dataSize += computeStringSizeNoTag(columnSpecIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getColumnSpecIdsList().size(); - } - for (int i = 0; i < values_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, values_.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.automl.v1beta1.Row)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.Row other = (com.google.cloud.automl.v1beta1.Row) obj; - - if (!getColumnSpecIdsList().equals(other.getColumnSpecIdsList())) return false; - 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 (getColumnSpecIdsCount() > 0) { - hash = (37 * hash) + COLUMN_SPEC_IDS_FIELD_NUMBER; - hash = (53 * hash) + getColumnSpecIdsList().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.automl.v1beta1.Row parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Row parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Row parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.Row parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.Row prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A representation of a row in a relational table.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.Row} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.Row) - com.google.cloud.automl.v1beta1.RowOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Row_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Row_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.Row.class, - com.google.cloud.automl.v1beta1.Row.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.Row.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getValuesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - columnSpecIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - valuesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_Row_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Row getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.Row.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Row build() { - com.google.cloud.automl.v1beta1.Row result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Row buildPartial() { - com.google.cloud.automl.v1beta1.Row result = new com.google.cloud.automl.v1beta1.Row(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - columnSpecIds_ = columnSpecIds_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.columnSpecIds_ = columnSpecIds_; - if (valuesBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.values_ = values_; - } else { - result.values_ = valuesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.Row) { - return mergeFrom((com.google.cloud.automl.v1beta1.Row) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.Row other) { - if (other == com.google.cloud.automl.v1beta1.Row.getDefaultInstance()) return this; - if (!other.columnSpecIds_.isEmpty()) { - if (columnSpecIds_.isEmpty()) { - columnSpecIds_ = other.columnSpecIds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureColumnSpecIdsIsMutable(); - columnSpecIds_.addAll(other.columnSpecIds_); - } - onChanged(); - } - if (valuesBuilder_ == null) { - if (!other.values_.isEmpty()) { - if (values_.isEmpty()) { - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureValuesIsMutable(); - values_.addAll(other.values_); - } - onChanged(); - } - } else { - if (!other.values_.isEmpty()) { - if (valuesBuilder_.isEmpty()) { - valuesBuilder_.dispose(); - valuesBuilder_ = null; - values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000002); - valuesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getValuesFieldBuilder() - : null; - } else { - valuesBuilder_.addAllMessages(other.values_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.Row parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.Row) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.LazyStringList columnSpecIds_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureColumnSpecIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - columnSpecIds_ = new com.google.protobuf.LazyStringArrayList(columnSpecIds_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @return A list containing the columnSpecIds. - */ - public com.google.protobuf.ProtocolStringList getColumnSpecIdsList() { - return columnSpecIds_.getUnmodifiableView(); - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @return The count of columnSpecIds. - */ - public int getColumnSpecIdsCount() { - return columnSpecIds_.size(); - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @param index The index of the element to return. - * @return The columnSpecIds at the given index. - */ - public java.lang.String getColumnSpecIds(int index) { - return columnSpecIds_.get(index); - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @param index The index of the value to return. - * @return The bytes of the columnSpecIds at the given index. - */ - public com.google.protobuf.ByteString getColumnSpecIdsBytes(int index) { - return columnSpecIds_.getByteString(index); - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @param index The index to set the value at. - * @param value The columnSpecIds to set. - * @return This builder for chaining. - */ - public Builder setColumnSpecIds(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnSpecIdsIsMutable(); - columnSpecIds_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @param value The columnSpecIds to add. - * @return This builder for chaining. - */ - public Builder addColumnSpecIds(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureColumnSpecIdsIsMutable(); - columnSpecIds_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @param values The columnSpecIds to add. - * @return This builder for chaining. - */ - public Builder addAllColumnSpecIds(java.lang.Iterable values) { - ensureColumnSpecIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columnSpecIds_); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @return This builder for chaining. - */ - public Builder clearColumnSpecIds() { - columnSpecIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource IDs of the column specs describing the columns of the row.
-     * If set must contain, but possibly in a different order, all input
-     * feature
-     * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * Note: The below `values` field must match order of this field, if this
-     * field is set.
-     * 
- * - * repeated string column_spec_ids = 2; - * - * @param value The bytes of the columnSpecIds to add. - * @return This builder for chaining. - */ - public Builder addColumnSpecIdsBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureColumnSpecIdsIsMutable(); - columnSpecIds_.add(value); - onChanged(); - return this; - } - - private java.util.List values_ = java.util.Collections.emptyList(); - - private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - values_ = new java.util.ArrayList(values_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - valuesBuilder_; - - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public java.util.List getValuesList() { - if (valuesBuilder_ == null) { - return java.util.Collections.unmodifiableList(values_); - } else { - return valuesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public int getValuesCount() { - if (valuesBuilder_ == null) { - return values_.size(); - } else { - return valuesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public com.google.protobuf.Value getValues(int index) { - if (valuesBuilder_ == null) { - return values_.get(index); - } else { - return valuesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder setValues(int index, com.google.protobuf.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.set(index, value); - onChanged(); - } else { - valuesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder setValues(int index, com.google.protobuf.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.set(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder addValues(com.google.protobuf.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(value); - onChanged(); - } else { - valuesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder addValues(int index, com.google.protobuf.Value value) { - if (valuesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureValuesIsMutable(); - values_.add(index, value); - onChanged(); - } else { - valuesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder addValues(com.google.protobuf.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder addValues(int index, com.google.protobuf.Value.Builder builderForValue) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.add(index, builderForValue.build()); - onChanged(); - } else { - valuesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder addAllValues(java.lang.Iterable values) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); - onChanged(); - } else { - valuesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder clearValues() { - if (valuesBuilder_ == null) { - values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - valuesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public Builder removeValues(int index) { - if (valuesBuilder_ == null) { - ensureValuesIsMutable(); - values_.remove(index); - onChanged(); - } else { - valuesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public com.google.protobuf.Value.Builder getValuesBuilder(int index) { - return getValuesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public com.google.protobuf.ValueOrBuilder getValuesOrBuilder(int index) { - if (valuesBuilder_ == null) { - return values_.get(index); - } else { - return valuesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public java.util.List getValuesOrBuilderList() { - if (valuesBuilder_ != null) { - return valuesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(values_); - } - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public com.google.protobuf.Value.Builder addValuesBuilder() { - return getValuesFieldBuilder().addBuilder(com.google.protobuf.Value.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public com.google.protobuf.Value.Builder addValuesBuilder(int index) { - return getValuesFieldBuilder() - .addBuilder(index, com.google.protobuf.Value.getDefaultInstance()); - } - /** - * - * - *
-     * Required. The values of the row cells, given in the same order as the
-     * column_spec_ids, or, if not set, then in the same order as input
-     * feature
-     * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * of the Model this row is being passed to.
-     * 
- * - * repeated .google.protobuf.Value values = 3; - */ - public java.util.List getValuesBuilderList() { - return getValuesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder> - getValuesFieldBuilder() { - if (valuesBuilder_ == null) { - valuesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protobuf.Value, - com.google.protobuf.Value.Builder, - com.google.protobuf.ValueOrBuilder>( - values_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - values_ = null; - } - return valuesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.Row) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.Row) - private static final com.google.cloud.automl.v1beta1.Row DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.Row(); - } - - public static com.google.cloud.automl.v1beta1.Row getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Row parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Row(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.Row getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RowOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RowOrBuilder.java deleted file mode 100644 index 7649c5f78..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/RowOrBuilder.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -public interface RowOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.Row) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @return A list containing the columnSpecIds. - */ - java.util.List getColumnSpecIdsList(); - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @return The count of columnSpecIds. - */ - int getColumnSpecIdsCount(); - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @param index The index of the element to return. - * @return The columnSpecIds at the given index. - */ - java.lang.String getColumnSpecIds(int index); - /** - * - * - *
-   * The resource IDs of the column specs describing the columns of the row.
-   * If set must contain, but possibly in a different order, all input
-   * feature
-   * [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * Note: The below `values` field must match order of this field, if this
-   * field is set.
-   * 
- * - * repeated string column_spec_ids = 2; - * - * @param index The index of the value to return. - * @return The bytes of the columnSpecIds at the given index. - */ - com.google.protobuf.ByteString getColumnSpecIdsBytes(int index); - - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - java.util.List getValuesList(); - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - com.google.protobuf.Value getValues(int index); - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - int getValuesCount(); - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - java.util.List getValuesOrBuilderList(); - /** - * - * - *
-   * Required. The values of the row cells, given in the same order as the
-   * column_spec_ids, or, if not set, then in the same order as input
-   * feature
-   * [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * of the Model this row is being passed to.
-   * 
- * - * repeated .google.protobuf.Value values = 3; - */ - com.google.protobuf.ValueOrBuilder getValuesOrBuilder(int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStats.java deleted file mode 100644 index 34262ebf2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStats.java +++ /dev/null @@ -1,1765 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The data statistics of a series of STRING values.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StringStats} - */ -public final class StringStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.StringStats) - StringStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use StringStats.newBuilder() to construct. - private StringStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StringStats() { - topUnigramStats_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StringStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StringStats( - 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)) { - topUnigramStats_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.StringStats.UnigramStats>(); - mutable_bitField0_ |= 0x00000001; - } - topUnigramStats_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.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)) { - topUnigramStats_ = java.util.Collections.unmodifiableList(topUnigramStats_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StringStats.class, - com.google.cloud.automl.v1beta1.StringStats.Builder.class); - } - - public interface UnigramStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.StringStats.UnigramStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The unigram.
-     * 
- * - * string value = 1; - * - * @return The value. - */ - java.lang.String getValue(); - /** - * - * - *
-     * The unigram.
-     * 
- * - * string value = 1; - * - * @return The bytes for value. - */ - com.google.protobuf.ByteString getValueBytes(); - - /** - * - * - *
-     * The number of occurrences of this unigram in the series.
-     * 
- * - * int64 count = 2; - * - * @return The count. - */ - long getCount(); - } - /** - * - * - *
-   * The statistics of a unigram.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StringStats.UnigramStats} - */ - public static final class UnigramStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.StringStats.UnigramStats) - UnigramStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use UnigramStats.newBuilder() to construct. - private UnigramStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UnigramStats() { - value_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UnigramStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UnigramStats( - 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(); - - value_ = s; - break; - } - case 16: - { - count_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.class, - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder.class); - } - - public static final int VALUE_FIELD_NUMBER = 1; - private volatile java.lang.Object value_; - /** - * - * - *
-     * The unigram.
-     * 
- * - * string value = 1; - * - * @return The value. - */ - 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; - } - } - /** - * - * - *
-     * The unigram.
-     * 
- * - * string value = 1; - * - * @return The bytes for value. - */ - 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; - } - } - - public static final int COUNT_FIELD_NUMBER = 2; - private long count_; - /** - * - * - *
-     * The number of occurrences of this unigram in the series.
-     * 
- * - * int64 count = 2; - * - * @return The count. - */ - public long getCount() { - return count_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); - } - if (count_ != 0L) { - output.writeInt64(2, count_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); - } - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.StringStats.UnigramStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.StringStats.UnigramStats other = - (com.google.cloud.automl.v1beta1.StringStats.UnigramStats) obj; - - if (!getValue().equals(other.getValue())) return false; - if (getCount() != other.getCount()) return false; - if (!unknownFields.equals(other.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) + getValue().hashCode(); - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.StringStats.UnigramStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 statistics of a unigram.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StringStats.UnigramStats} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.StringStats.UnigramStats) - com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.class, - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.StringStats.UnigramStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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_ = ""; - - count_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_UnigramStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.StringStats.UnigramStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats build() { - com.google.cloud.automl.v1beta1.StringStats.UnigramStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats buildPartial() { - com.google.cloud.automl.v1beta1.StringStats.UnigramStats result = - new com.google.cloud.automl.v1beta1.StringStats.UnigramStats(this); - result.value_ = value_; - result.count_ = count_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.StringStats.UnigramStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.StringStats.UnigramStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.StringStats.UnigramStats other) { - if (other == com.google.cloud.automl.v1beta1.StringStats.UnigramStats.getDefaultInstance()) - return this; - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.StringStats.UnigramStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.StringStats.UnigramStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object value_ = ""; - /** - * - * - *
-       * The unigram.
-       * 
- * - * string value = 1; - * - * @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; - } - } - /** - * - * - *
-       * The unigram.
-       * 
- * - * string value = 1; - * - * @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; - } - } - /** - * - * - *
-       * The unigram.
-       * 
- * - * string value = 1; - * - * @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; - } - /** - * - * - *
-       * The unigram.
-       * 
- * - * string value = 1; - * - * @return This builder for chaining. - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * - * - *
-       * The unigram.
-       * 
- * - * string value = 1; - * - * @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; - } - - private long count_; - /** - * - * - *
-       * The number of occurrences of this unigram in the series.
-       * 
- * - * int64 count = 2; - * - * @return The count. - */ - public long getCount() { - return count_; - } - /** - * - * - *
-       * The number of occurrences of this unigram in the series.
-       * 
- * - * int64 count = 2; - * - * @param value The count to set. - * @return This builder for chaining. - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The number of occurrences of this unigram in the series.
-       * 
- * - * int64 count = 2; - * - * @return This builder for chaining. - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.StringStats.UnigramStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.StringStats.UnigramStats) - private static final com.google.cloud.automl.v1beta1.StringStats.UnigramStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.StringStats.UnigramStats(); - } - - public static com.google.cloud.automl.v1beta1.StringStats.UnigramStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnigramStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UnigramStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int TOP_UNIGRAM_STATS_FIELD_NUMBER = 1; - private java.util.List topUnigramStats_; - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public java.util.List - getTopUnigramStatsList() { - return topUnigramStats_; - } - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public java.util.List - getTopUnigramStatsOrBuilderList() { - return topUnigramStats_; - } - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public int getTopUnigramStatsCount() { - return topUnigramStats_.size(); - } - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats getTopUnigramStats(int index) { - return topUnigramStats_.get(index); - } - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder - getTopUnigramStatsOrBuilder(int index) { - return topUnigramStats_.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 < topUnigramStats_.size(); i++) { - output.writeMessage(1, topUnigramStats_.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 < topUnigramStats_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topUnigramStats_.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.automl.v1beta1.StringStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.StringStats other = - (com.google.cloud.automl.v1beta1.StringStats) obj; - - if (!getTopUnigramStatsList().equals(other.getTopUnigramStatsList())) return false; - if (!unknownFields.equals(other.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 (getTopUnigramStatsCount() > 0) { - hash = (37 * hash) + TOP_UNIGRAM_STATS_FIELD_NUMBER; - hash = (53 * hash) + getTopUnigramStatsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StringStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.StringStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data statistics of a series of STRING values.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StringStats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.StringStats) - com.google.cloud.automl.v1beta1.StringStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StringStats.class, - com.google.cloud.automl.v1beta1.StringStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.StringStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopUnigramStatsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (topUnigramStatsBuilder_ == null) { - topUnigramStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - topUnigramStatsBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StringStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats build() { - com.google.cloud.automl.v1beta1.StringStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats buildPartial() { - com.google.cloud.automl.v1beta1.StringStats result = - new com.google.cloud.automl.v1beta1.StringStats(this); - int from_bitField0_ = bitField0_; - if (topUnigramStatsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - topUnigramStats_ = java.util.Collections.unmodifiableList(topUnigramStats_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.topUnigramStats_ = topUnigramStats_; - } else { - result.topUnigramStats_ = topUnigramStatsBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.StringStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.StringStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.StringStats other) { - if (other == com.google.cloud.automl.v1beta1.StringStats.getDefaultInstance()) return this; - if (topUnigramStatsBuilder_ == null) { - if (!other.topUnigramStats_.isEmpty()) { - if (topUnigramStats_.isEmpty()) { - topUnigramStats_ = other.topUnigramStats_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.addAll(other.topUnigramStats_); - } - onChanged(); - } - } else { - if (!other.topUnigramStats_.isEmpty()) { - if (topUnigramStatsBuilder_.isEmpty()) { - topUnigramStatsBuilder_.dispose(); - topUnigramStatsBuilder_ = null; - topUnigramStats_ = other.topUnigramStats_; - bitField0_ = (bitField0_ & ~0x00000001); - topUnigramStatsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTopUnigramStatsFieldBuilder() - : null; - } else { - topUnigramStatsBuilder_.addAllMessages(other.topUnigramStats_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.StringStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.StringStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List - topUnigramStats_ = java.util.Collections.emptyList(); - - private void ensureTopUnigramStatsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - topUnigramStats_ = - new java.util.ArrayList( - topUnigramStats_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.StringStats.UnigramStats, - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder, - com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder> - topUnigramStatsBuilder_; - - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public java.util.List - getTopUnigramStatsList() { - if (topUnigramStatsBuilder_ == null) { - return java.util.Collections.unmodifiableList(topUnigramStats_); - } else { - return topUnigramStatsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public int getTopUnigramStatsCount() { - if (topUnigramStatsBuilder_ == null) { - return topUnigramStats_.size(); - } else { - return topUnigramStatsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats getTopUnigramStats(int index) { - if (topUnigramStatsBuilder_ == null) { - return topUnigramStats_.get(index); - } else { - return topUnigramStatsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder setTopUnigramStats( - int index, com.google.cloud.automl.v1beta1.StringStats.UnigramStats value) { - if (topUnigramStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.set(index, value); - onChanged(); - } else { - topUnigramStatsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder setTopUnigramStats( - int index, - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder builderForValue) { - if (topUnigramStatsBuilder_ == null) { - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.set(index, builderForValue.build()); - onChanged(); - } else { - topUnigramStatsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder addTopUnigramStats( - com.google.cloud.automl.v1beta1.StringStats.UnigramStats value) { - if (topUnigramStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.add(value); - onChanged(); - } else { - topUnigramStatsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder addTopUnigramStats( - int index, com.google.cloud.automl.v1beta1.StringStats.UnigramStats value) { - if (topUnigramStatsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.add(index, value); - onChanged(); - } else { - topUnigramStatsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder addTopUnigramStats( - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder builderForValue) { - if (topUnigramStatsBuilder_ == null) { - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.add(builderForValue.build()); - onChanged(); - } else { - topUnigramStatsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder addTopUnigramStats( - int index, - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder builderForValue) { - if (topUnigramStatsBuilder_ == null) { - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.add(index, builderForValue.build()); - onChanged(); - } else { - topUnigramStatsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder addAllTopUnigramStats( - java.lang.Iterable - values) { - if (topUnigramStatsBuilder_ == null) { - ensureTopUnigramStatsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, topUnigramStats_); - onChanged(); - } else { - topUnigramStatsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder clearTopUnigramStats() { - if (topUnigramStatsBuilder_ == null) { - topUnigramStats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - topUnigramStatsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public Builder removeTopUnigramStats(int index) { - if (topUnigramStatsBuilder_ == null) { - ensureTopUnigramStatsIsMutable(); - topUnigramStats_.remove(index); - onChanged(); - } else { - topUnigramStatsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder - getTopUnigramStatsBuilder(int index) { - return getTopUnigramStatsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder - getTopUnigramStatsOrBuilder(int index) { - if (topUnigramStatsBuilder_ == null) { - return topUnigramStats_.get(index); - } else { - return topUnigramStatsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder> - getTopUnigramStatsOrBuilderList() { - if (topUnigramStatsBuilder_ != null) { - return topUnigramStatsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(topUnigramStats_); - } - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder - addTopUnigramStatsBuilder() { - return getTopUnigramStatsFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.getDefaultInstance()); - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder - addTopUnigramStatsBuilder(int index) { - return getTopUnigramStatsFieldBuilder() - .addBuilder( - index, com.google.cloud.automl.v1beta1.StringStats.UnigramStats.getDefaultInstance()); - } - /** - * - * - *
-     * The statistics of the top 20 unigrams, ordered by
-     * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-     * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - public java.util.List - getTopUnigramStatsBuilderList() { - return getTopUnigramStatsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.StringStats.UnigramStats, - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder, - com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder> - getTopUnigramStatsFieldBuilder() { - if (topUnigramStatsBuilder_ == null) { - topUnigramStatsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.StringStats.UnigramStats, - com.google.cloud.automl.v1beta1.StringStats.UnigramStats.Builder, - com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder>( - topUnigramStats_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - topUnigramStats_ = null; - } - return topUnigramStatsBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.StringStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.StringStats) - private static final com.google.cloud.automl.v1beta1.StringStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.StringStats(); - } - - public static com.google.cloud.automl.v1beta1.StringStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StringStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StringStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StringStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStatsOrBuilder.java deleted file mode 100644 index aa4802c2c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StringStatsOrBuilder.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface StringStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.StringStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - java.util.List getTopUnigramStatsList(); - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - com.google.cloud.automl.v1beta1.StringStats.UnigramStats getTopUnigramStats(int index); - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - int getTopUnigramStatsCount(); - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - java.util.List - getTopUnigramStatsOrBuilderList(); - /** - * - * - *
-   * The statistics of the top 20 unigrams, ordered by
-   * [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count].
-   * 
- * - * repeated .google.cloud.automl.v1beta1.StringStats.UnigramStats top_unigram_stats = 1; - * - */ - com.google.cloud.automl.v1beta1.StringStats.UnigramStatsOrBuilder getTopUnigramStatsOrBuilder( - int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStats.java deleted file mode 100644 index 2b77613c1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStats.java +++ /dev/null @@ -1,808 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The data statistics of a series of STRUCT values.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StructStats} - */ -public final class StructStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.StructStats) - StructStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use StructStats.newBuilder() to construct. - private StructStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StructStats() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StructStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StructStats( - 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)) { - fieldStats_ = - com.google.protobuf.MapField.newMapField( - FieldStatsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.DataStats> - fieldStats__ = - input.readMessage( - FieldStatsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - fieldStats_.getMutableMap().put(fieldStats__.getKey(), fieldStats__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StructStats_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetFieldStats(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StructStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StructStats.class, - com.google.cloud.automl.v1beta1.StructStats.Builder.class); - } - - public static final int FIELD_STATS_FIELD_NUMBER = 1; - - private static final class FieldStatsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.DataStats> - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StructStats_FieldStatsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.automl.v1beta1.DataStats.getDefaultInstance()); - } - - private com.google.protobuf.MapField - fieldStats_; - - private com.google.protobuf.MapField - internalGetFieldStats() { - if (fieldStats_ == null) { - return com.google.protobuf.MapField.emptyMapField(FieldStatsDefaultEntryHolder.defaultEntry); - } - return fieldStats_; - } - - public int getFieldStatsCount() { - return internalGetFieldStats().getMap().size(); - } - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public boolean containsFieldStats(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetFieldStats().getMap().containsKey(key); - } - /** Use {@link #getFieldStatsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map - getFieldStats() { - return getFieldStatsMap(); - } - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public java.util.Map - getFieldStatsMap() { - return internalGetFieldStats().getMap(); - } - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public com.google.cloud.automl.v1beta1.DataStats getFieldStatsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.DataStats defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFieldStats().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public com.google.cloud.automl.v1beta1.DataStats getFieldStatsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFieldStats().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 { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetFieldStats(), FieldStatsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetFieldStats().getMap().entrySet()) { - com.google.protobuf.MapEntry - fieldStats__ = - FieldStatsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fieldStats__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.StructStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.StructStats other = - (com.google.cloud.automl.v1beta1.StructStats) obj; - - if (!internalGetFieldStats().equals(other.internalGetFieldStats())) return false; - if (!unknownFields.equals(other.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 (!internalGetFieldStats().getMap().isEmpty()) { - hash = (37 * hash) + FIELD_STATS_FIELD_NUMBER; - hash = (53 * hash) + internalGetFieldStats().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StructStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.StructStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data statistics of a series of STRUCT values.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StructStats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.StructStats) - com.google.cloud.automl.v1beta1.StructStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StructStats_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetFieldStats(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableFieldStats(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StructStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StructStats.class, - com.google.cloud.automl.v1beta1.StructStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.StructStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableFieldStats().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_StructStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructStats build() { - com.google.cloud.automl.v1beta1.StructStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructStats buildPartial() { - com.google.cloud.automl.v1beta1.StructStats result = - new com.google.cloud.automl.v1beta1.StructStats(this); - int from_bitField0_ = bitField0_; - result.fieldStats_ = internalGetFieldStats(); - result.fieldStats_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.StructStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.StructStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.StructStats other) { - if (other == com.google.cloud.automl.v1beta1.StructStats.getDefaultInstance()) return this; - internalGetMutableFieldStats().mergeFrom(other.internalGetFieldStats()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.StructStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.StructStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.DataStats> - fieldStats_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.DataStats> - internalGetFieldStats() { - if (fieldStats_ == null) { - return com.google.protobuf.MapField.emptyMapField( - FieldStatsDefaultEntryHolder.defaultEntry); - } - return fieldStats_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.DataStats> - internalGetMutableFieldStats() { - onChanged(); - ; - if (fieldStats_ == null) { - fieldStats_ = - com.google.protobuf.MapField.newMapField(FieldStatsDefaultEntryHolder.defaultEntry); - } - if (!fieldStats_.isMutable()) { - fieldStats_ = fieldStats_.copy(); - } - return fieldStats_; - } - - public int getFieldStatsCount() { - return internalGetFieldStats().getMap().size(); - } - /** - * - * - *
-     * Map from a field name of the struct to data stats aggregated over series
-     * of all data in that field across all the structs.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public boolean containsFieldStats(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetFieldStats().getMap().containsKey(key); - } - /** Use {@link #getFieldStatsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map - getFieldStats() { - return getFieldStatsMap(); - } - /** - * - * - *
-     * Map from a field name of the struct to data stats aggregated over series
-     * of all data in that field across all the structs.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public java.util.Map - getFieldStatsMap() { - return internalGetFieldStats().getMap(); - } - /** - * - * - *
-     * Map from a field name of the struct to data stats aggregated over series
-     * of all data in that field across all the structs.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public com.google.cloud.automl.v1beta1.DataStats getFieldStatsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.DataStats defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFieldStats().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Map from a field name of the struct to data stats aggregated over series
-     * of all data in that field across all the structs.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public com.google.cloud.automl.v1beta1.DataStats getFieldStatsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFieldStats().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearFieldStats() { - internalGetMutableFieldStats().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Map from a field name of the struct to data stats aggregated over series
-     * of all data in that field across all the structs.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public Builder removeFieldStats(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableFieldStats().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableFieldStats() { - return internalGetMutableFieldStats().getMutableMap(); - } - /** - * - * - *
-     * Map from a field name of the struct to data stats aggregated over series
-     * of all data in that field across all the structs.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public Builder putFieldStats( - java.lang.String key, com.google.cloud.automl.v1beta1.DataStats value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableFieldStats().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Map from a field name of the struct to data stats aggregated over series
-     * of all data in that field across all the structs.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - public Builder putAllFieldStats( - java.util.Map values) { - internalGetMutableFieldStats().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.StructStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.StructStats) - private static final com.google.cloud.automl.v1beta1.StructStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.StructStats(); - } - - public static com.google.cloud.automl.v1beta1.StructStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StructStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StructStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStatsOrBuilder.java deleted file mode 100644 index 8e438d41d..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructStatsOrBuilder.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface StructStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.StructStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - int getFieldStatsCount(); - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - boolean containsFieldStats(java.lang.String key); - /** Use {@link #getFieldStatsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getFieldStats(); - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - java.util.Map getFieldStatsMap(); - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - com.google.cloud.automl.v1beta1.DataStats getFieldStatsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.DataStats defaultValue); - /** - * - * - *
-   * Map from a field name of the struct to data stats aggregated over series
-   * of all data in that field across all the structs.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataStats> field_stats = 1; - */ - com.google.cloud.automl.v1beta1.DataStats getFieldStatsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructType.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructType.java deleted file mode 100644 index b12d32e7e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructType.java +++ /dev/null @@ -1,809 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_types.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StructType} - */ -public final class StructType extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.StructType) - StructTypeOrBuilder { - private static final long serialVersionUID = 0L; - // Use StructType.newBuilder() to construct. - private StructType(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private StructType() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new StructType(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private StructType( - 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)) { - fields_ = - com.google.protobuf.MapField.newMapField(FieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.DataType> - fields__ = - input.readMessage( - FieldsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - fields_.getMutableMap().put(fields__.getKey(), fields__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_StructType_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetFields(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_StructType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StructType.class, - com.google.cloud.automl.v1beta1.StructType.Builder.class); - } - - public static final int FIELDS_FIELD_NUMBER = 1; - - private static final class FieldsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.DataType> - defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_StructType_FieldsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.automl.v1beta1.DataType.getDefaultInstance()); - } - - private com.google.protobuf.MapField - fields_; - - private com.google.protobuf.MapField - internalGetFields() { - if (fields_ == null) { - return com.google.protobuf.MapField.emptyMapField(FieldsDefaultEntryHolder.defaultEntry); - } - return fields_; - } - - public int getFieldsCount() { - return internalGetFields().getMap().size(); - } - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public boolean containsFields(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetFields().getMap().containsKey(key); - } - /** Use {@link #getFieldsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getFields() { - return getFieldsMap(); - } - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public java.util.Map getFieldsMap() { - return internalGetFields().getMap(); - } - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public com.google.cloud.automl.v1beta1.DataType getFieldsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.DataType defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFields().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public com.google.cloud.automl.v1beta1.DataType getFieldsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFields().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 { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetFields(), FieldsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetFields().getMap().entrySet()) { - com.google.protobuf.MapEntry - fields__ = - FieldsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.StructType)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.StructType other = - (com.google.cloud.automl.v1beta1.StructType) obj; - - if (!internalGetFields().equals(other.internalGetFields())) return false; - if (!unknownFields.equals(other.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 (!internalGetFields().getMap().isEmpty()) { - hash = (37 * hash) + FIELDS_FIELD_NUMBER; - hash = (53 * hash) + internalGetFields().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructType parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StructType parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.StructType parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.StructType prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.StructType} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.StructType) - com.google.cloud.automl.v1beta1.StructTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_StructType_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetFields(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableFields(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_StructType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.StructType.class, - com.google.cloud.automl.v1beta1.StructType.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.StructType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableFields().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataTypes - .internal_static_google_cloud_automl_v1beta1_StructType_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructType getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.StructType.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructType build() { - com.google.cloud.automl.v1beta1.StructType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructType buildPartial() { - com.google.cloud.automl.v1beta1.StructType result = - new com.google.cloud.automl.v1beta1.StructType(this); - int from_bitField0_ = bitField0_; - result.fields_ = internalGetFields(); - result.fields_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.StructType) { - return mergeFrom((com.google.cloud.automl.v1beta1.StructType) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.StructType other) { - if (other == com.google.cloud.automl.v1beta1.StructType.getDefaultInstance()) return this; - internalGetMutableFields().mergeFrom(other.internalGetFields()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.StructType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.StructType) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField - fields_; - - private com.google.protobuf.MapField - internalGetFields() { - if (fields_ == null) { - return com.google.protobuf.MapField.emptyMapField(FieldsDefaultEntryHolder.defaultEntry); - } - return fields_; - } - - private com.google.protobuf.MapField - internalGetMutableFields() { - onChanged(); - ; - if (fields_ == null) { - fields_ = com.google.protobuf.MapField.newMapField(FieldsDefaultEntryHolder.defaultEntry); - } - if (!fields_.isMutable()) { - fields_ = fields_.copy(); - } - return fields_; - } - - public int getFieldsCount() { - return internalGetFields().getMap().size(); - } - /** - * - * - *
-     * Unordered map of struct field names to their data types.
-     * Fields cannot be added or removed via Update. Their names and
-     * data types are still mutable.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public boolean containsFields(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetFields().getMap().containsKey(key); - } - /** Use {@link #getFieldsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getFields() { - return getFieldsMap(); - } - /** - * - * - *
-     * Unordered map of struct field names to their data types.
-     * Fields cannot be added or removed via Update. Their names and
-     * data types are still mutable.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public java.util.Map - getFieldsMap() { - return internalGetFields().getMap(); - } - /** - * - * - *
-     * Unordered map of struct field names to their data types.
-     * Fields cannot be added or removed via Update. Their names and
-     * data types are still mutable.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public com.google.cloud.automl.v1beta1.DataType getFieldsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.DataType defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFields().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Unordered map of struct field names to their data types.
-     * Fields cannot be added or removed via Update. Their names and
-     * data types are still mutable.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public com.google.cloud.automl.v1beta1.DataType getFieldsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetFields().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearFields() { - internalGetMutableFields().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Unordered map of struct field names to their data types.
-     * Fields cannot be added or removed via Update. Their names and
-     * data types are still mutable.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public Builder removeFields(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableFields().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableFields() { - return internalGetMutableFields().getMutableMap(); - } - /** - * - * - *
-     * Unordered map of struct field names to their data types.
-     * Fields cannot be added or removed via Update. Their names and
-     * data types are still mutable.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public Builder putFields(java.lang.String key, com.google.cloud.automl.v1beta1.DataType value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableFields().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Unordered map of struct field names to their data types.
-     * Fields cannot be added or removed via Update. Their names and
-     * data types are still mutable.
-     * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - public Builder putAllFields( - java.util.Map values) { - internalGetMutableFields().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.StructType) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.StructType) - private static final com.google.cloud.automl.v1beta1.StructType DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.StructType(); - } - - public static com.google.cloud.automl.v1beta1.StructType getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public StructType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StructType(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.StructType getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructTypeOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructTypeOrBuilder.java deleted file mode 100644 index 2c8e42cc5..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/StructTypeOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_types.proto - -package com.google.cloud.automl.v1beta1; - -public interface StructTypeOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.StructType) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - int getFieldsCount(); - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - boolean containsFields(java.lang.String key); - /** Use {@link #getFieldsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getFields(); - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - java.util.Map getFieldsMap(); - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - com.google.cloud.automl.v1beta1.DataType getFieldsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.DataType defaultValue); - /** - * - * - *
-   * Unordered map of struct field names to their data types.
-   * Fields cannot be added or removed via Update. Their names and
-   * data types are still mutable.
-   * 
- * - * map<string, .google.cloud.automl.v1beta1.DataType> fields = 1; - */ - com.google.cloud.automl.v1beta1.DataType getFieldsOrThrow(java.lang.String key); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpec.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpec.java deleted file mode 100644 index 6791ba3a9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpec.java +++ /dev/null @@ -1,1858 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/table_spec.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A specification of a relational table.
- * The table's schema is represented via its child column specs. It is
- * pre-populated as part of ImportData by schema inference algorithm, the
- * version of which is a required parameter of ImportData InputConfig.
- * Note: While working with a table, at times the schema may be
- * inconsistent with the data in the table (e.g. string in a FLOAT64 column).
- * The consistency validation is done upon creation of a model.
- * Used by:
- *   *   Tables
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TableSpec} - */ -public final class TableSpec extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TableSpec) - TableSpecOrBuilder { - private static final long serialVersionUID = 0L; - // Use TableSpec.newBuilder() to construct. - private TableSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TableSpec() { - name_ = ""; - timeColumnSpecId_ = ""; - inputConfigs_ = java.util.Collections.emptyList(); - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TableSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TableSpec( - 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(); - - timeColumnSpecId_ = s; - break; - } - case 24: - { - rowCount_ = input.readInt64(); - break; - } - case 32: - { - validRowCount_ = input.readInt64(); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - inputConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inputConfigs_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.InputConfig.parser(), extensionRegistry)); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 56: - { - columnCount_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TableSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TableSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_TableSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TableSpec.class, - com.google.cloud.automl.v1beta1.TableSpec.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The resource name of the table spec.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - 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 table spec.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - 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 TIME_COLUMN_SPEC_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object timeColumnSpecId_; - /** - * - * - *
-   * column_spec_id of the time column. Only used if the parent dataset's
-   * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-   * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-   * those in between to VALIDATE.
-   * Required type: TIMESTAMP.
-   * If both this column and ml_use_column are not set, then ML use of all rows
-   * will be assigned by AutoML. NOTE: Updates of this field will instantly
-   * affect any other users concurrently working with the dataset.
-   * 
- * - * string time_column_spec_id = 2; - * - * @return The timeColumnSpecId. - */ - public java.lang.String getTimeColumnSpecId() { - java.lang.Object ref = timeColumnSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - timeColumnSpecId_ = s; - return s; - } - } - /** - * - * - *
-   * column_spec_id of the time column. Only used if the parent dataset's
-   * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-   * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-   * those in between to VALIDATE.
-   * Required type: TIMESTAMP.
-   * If both this column and ml_use_column are not set, then ML use of all rows
-   * will be assigned by AutoML. NOTE: Updates of this field will instantly
-   * affect any other users concurrently working with the dataset.
-   * 
- * - * string time_column_spec_id = 2; - * - * @return The bytes for timeColumnSpecId. - */ - public com.google.protobuf.ByteString getTimeColumnSpecIdBytes() { - java.lang.Object ref = timeColumnSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - timeColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ROW_COUNT_FIELD_NUMBER = 3; - private long rowCount_; - /** - * - * - *
-   * Output only. The number of rows (i.e. examples) in the table.
-   * 
- * - * int64 row_count = 3; - * - * @return The rowCount. - */ - public long getRowCount() { - return rowCount_; - } - - public static final int VALID_ROW_COUNT_FIELD_NUMBER = 4; - private long validRowCount_; - /** - * - * - *
-   * Output only. The number of valid rows (i.e. without values that don't match
-   * DataType-s of their columns).
-   * 
- * - * int64 valid_row_count = 4; - * - * @return The validRowCount. - */ - public long getValidRowCount() { - return validRowCount_; - } - - public static final int COLUMN_COUNT_FIELD_NUMBER = 7; - private long columnCount_; - /** - * - * - *
-   * Output only. The number of columns of the table. That is, the number of
-   * child ColumnSpec-s.
-   * 
- * - * int64 column_count = 7; - * - * @return The columnCount. - */ - public long getColumnCount() { - return columnCount_; - } - - public static final int INPUT_CONFIGS_FIELD_NUMBER = 5; - private java.util.List inputConfigs_; - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public java.util.List getInputConfigsList() { - return inputConfigs_; - } - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public java.util.List - getInputConfigsOrBuilderList() { - return inputConfigs_; - } - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public int getInputConfigsCount() { - return inputConfigs_.size(); - } - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public com.google.cloud.automl.v1beta1.InputConfig getInputConfigs(int index) { - return inputConfigs_.get(index); - } - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder(int index) { - return inputConfigs_.get(index); - } - - 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. - */ - 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. - */ - 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 (!getTimeColumnSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, timeColumnSpecId_); - } - if (rowCount_ != 0L) { - output.writeInt64(3, rowCount_); - } - if (validRowCount_ != 0L) { - output.writeInt64(4, validRowCount_); - } - for (int i = 0; i < inputConfigs_.size(); i++) { - output.writeMessage(5, inputConfigs_.get(i)); - } - if (!getEtagBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, etag_); - } - if (columnCount_ != 0L) { - output.writeInt64(7, columnCount_); - } - 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 (!getTimeColumnSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, timeColumnSpecId_); - } - if (rowCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, rowCount_); - } - if (validRowCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, validRowCount_); - } - for (int i = 0; i < inputConfigs_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, inputConfigs_.get(i)); - } - if (!getEtagBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, etag_); - } - if (columnCount_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, columnCount_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TableSpec)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TableSpec other = - (com.google.cloud.automl.v1beta1.TableSpec) obj; - - if (!getName().equals(other.getName())) return false; - if (!getTimeColumnSpecId().equals(other.getTimeColumnSpecId())) return false; - if (getRowCount() != other.getRowCount()) return false; - if (getValidRowCount() != other.getValidRowCount()) return false; - if (getColumnCount() != other.getColumnCount()) return false; - if (!getInputConfigsList().equals(other.getInputConfigsList())) 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) + TIME_COLUMN_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getTimeColumnSpecId().hashCode(); - hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowCount()); - hash = (37 * hash) + VALID_ROW_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getValidRowCount()); - hash = (37 * hash) + COLUMN_COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getColumnCount()); - if (getInputConfigsCount() > 0) { - hash = (37 * hash) + INPUT_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getInputConfigsList().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.automl.v1beta1.TableSpec parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TableSpec parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.TableSpec prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 specification of a relational table.
-   * The table's schema is represented via its child column specs. It is
-   * pre-populated as part of ImportData by schema inference algorithm, the
-   * version of which is a required parameter of ImportData InputConfig.
-   * Note: While working with a table, at times the schema may be
-   * inconsistent with the data in the table (e.g. string in a FLOAT64 column).
-   * The consistency validation is done upon creation of a model.
-   * Used by:
-   *   *   Tables
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TableSpec} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TableSpec) - com.google.cloud.automl.v1beta1.TableSpecOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TableSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TableSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_TableSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TableSpec.class, - com.google.cloud.automl.v1beta1.TableSpec.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TableSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInputConfigsFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - timeColumnSpecId_ = ""; - - rowCount_ = 0L; - - validRowCount_ = 0L; - - columnCount_ = 0L; - - if (inputConfigsBuilder_ == null) { - inputConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - inputConfigsBuilder_.clear(); - } - etag_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TableSpecOuterClass - .internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TableSpec getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TableSpec build() { - com.google.cloud.automl.v1beta1.TableSpec result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TableSpec buildPartial() { - com.google.cloud.automl.v1beta1.TableSpec result = - new com.google.cloud.automl.v1beta1.TableSpec(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.timeColumnSpecId_ = timeColumnSpecId_; - result.rowCount_ = rowCount_; - result.validRowCount_ = validRowCount_; - result.columnCount_ = columnCount_; - if (inputConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - inputConfigs_ = java.util.Collections.unmodifiableList(inputConfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.inputConfigs_ = inputConfigs_; - } else { - result.inputConfigs_ = inputConfigsBuilder_.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.automl.v1beta1.TableSpec) { - return mergeFrom((com.google.cloud.automl.v1beta1.TableSpec) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TableSpec other) { - if (other == com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getTimeColumnSpecId().isEmpty()) { - timeColumnSpecId_ = other.timeColumnSpecId_; - onChanged(); - } - if (other.getRowCount() != 0L) { - setRowCount(other.getRowCount()); - } - if (other.getValidRowCount() != 0L) { - setValidRowCount(other.getValidRowCount()); - } - if (other.getColumnCount() != 0L) { - setColumnCount(other.getColumnCount()); - } - if (inputConfigsBuilder_ == null) { - if (!other.inputConfigs_.isEmpty()) { - if (inputConfigs_.isEmpty()) { - inputConfigs_ = other.inputConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInputConfigsIsMutable(); - inputConfigs_.addAll(other.inputConfigs_); - } - onChanged(); - } - } else { - if (!other.inputConfigs_.isEmpty()) { - if (inputConfigsBuilder_.isEmpty()) { - inputConfigsBuilder_.dispose(); - inputConfigsBuilder_ = null; - inputConfigs_ = other.inputConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - inputConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInputConfigsFieldBuilder() - : null; - } else { - inputConfigsBuilder_.addAllMessages(other.inputConfigs_); - } - } - } - 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.automl.v1beta1.TableSpec parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.TableSpec) 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 table spec.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. The resource name of the table spec.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Output only. The resource name of the table spec.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-     * 
- * - * 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; - } - /** - * - * - *
-     * Output only. The resource name of the table spec.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-     * 
- * - * string name = 1; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name of the table spec.
-     * Form:
-     * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-     * 
- * - * 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 timeColumnSpecId_ = ""; - /** - * - * - *
-     * column_spec_id of the time column. Only used if the parent dataset's
-     * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-     * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-     * those in between to VALIDATE.
-     * Required type: TIMESTAMP.
-     * If both this column and ml_use_column are not set, then ML use of all rows
-     * will be assigned by AutoML. NOTE: Updates of this field will instantly
-     * affect any other users concurrently working with the dataset.
-     * 
- * - * string time_column_spec_id = 2; - * - * @return The timeColumnSpecId. - */ - public java.lang.String getTimeColumnSpecId() { - java.lang.Object ref = timeColumnSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - timeColumnSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * column_spec_id of the time column. Only used if the parent dataset's
-     * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-     * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-     * those in between to VALIDATE.
-     * Required type: TIMESTAMP.
-     * If both this column and ml_use_column are not set, then ML use of all rows
-     * will be assigned by AutoML. NOTE: Updates of this field will instantly
-     * affect any other users concurrently working with the dataset.
-     * 
- * - * string time_column_spec_id = 2; - * - * @return The bytes for timeColumnSpecId. - */ - public com.google.protobuf.ByteString getTimeColumnSpecIdBytes() { - java.lang.Object ref = timeColumnSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - timeColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * column_spec_id of the time column. Only used if the parent dataset's
-     * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-     * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-     * those in between to VALIDATE.
-     * Required type: TIMESTAMP.
-     * If both this column and ml_use_column are not set, then ML use of all rows
-     * will be assigned by AutoML. NOTE: Updates of this field will instantly
-     * affect any other users concurrently working with the dataset.
-     * 
- * - * string time_column_spec_id = 2; - * - * @param value The timeColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setTimeColumnSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - timeColumnSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the time column. Only used if the parent dataset's
-     * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-     * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-     * those in between to VALIDATE.
-     * Required type: TIMESTAMP.
-     * If both this column and ml_use_column are not set, then ML use of all rows
-     * will be assigned by AutoML. NOTE: Updates of this field will instantly
-     * affect any other users concurrently working with the dataset.
-     * 
- * - * string time_column_spec_id = 2; - * - * @return This builder for chaining. - */ - public Builder clearTimeColumnSpecId() { - - timeColumnSpecId_ = getDefaultInstance().getTimeColumnSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the time column. Only used if the parent dataset's
-     * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-     * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-     * those in between to VALIDATE.
-     * Required type: TIMESTAMP.
-     * If both this column and ml_use_column are not set, then ML use of all rows
-     * will be assigned by AutoML. NOTE: Updates of this field will instantly
-     * affect any other users concurrently working with the dataset.
-     * 
- * - * string time_column_spec_id = 2; - * - * @param value The bytes for timeColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setTimeColumnSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - timeColumnSpecId_ = value; - onChanged(); - return this; - } - - private long rowCount_; - /** - * - * - *
-     * Output only. The number of rows (i.e. examples) in the table.
-     * 
- * - * int64 row_count = 3; - * - * @return The rowCount. - */ - public long getRowCount() { - return rowCount_; - } - /** - * - * - *
-     * Output only. The number of rows (i.e. examples) in the table.
-     * 
- * - * int64 row_count = 3; - * - * @param value The rowCount to set. - * @return This builder for chaining. - */ - public Builder setRowCount(long value) { - - rowCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of rows (i.e. examples) in the table.
-     * 
- * - * int64 row_count = 3; - * - * @return This builder for chaining. - */ - public Builder clearRowCount() { - - rowCount_ = 0L; - onChanged(); - return this; - } - - private long validRowCount_; - /** - * - * - *
-     * Output only. The number of valid rows (i.e. without values that don't match
-     * DataType-s of their columns).
-     * 
- * - * int64 valid_row_count = 4; - * - * @return The validRowCount. - */ - public long getValidRowCount() { - return validRowCount_; - } - /** - * - * - *
-     * Output only. The number of valid rows (i.e. without values that don't match
-     * DataType-s of their columns).
-     * 
- * - * int64 valid_row_count = 4; - * - * @param value The validRowCount to set. - * @return This builder for chaining. - */ - public Builder setValidRowCount(long value) { - - validRowCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of valid rows (i.e. without values that don't match
-     * DataType-s of their columns).
-     * 
- * - * int64 valid_row_count = 4; - * - * @return This builder for chaining. - */ - public Builder clearValidRowCount() { - - validRowCount_ = 0L; - onChanged(); - return this; - } - - private long columnCount_; - /** - * - * - *
-     * Output only. The number of columns of the table. That is, the number of
-     * child ColumnSpec-s.
-     * 
- * - * int64 column_count = 7; - * - * @return The columnCount. - */ - public long getColumnCount() { - return columnCount_; - } - /** - * - * - *
-     * Output only. The number of columns of the table. That is, the number of
-     * child ColumnSpec-s.
-     * 
- * - * int64 column_count = 7; - * - * @param value The columnCount to set. - * @return This builder for chaining. - */ - public Builder setColumnCount(long value) { - - columnCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of columns of the table. That is, the number of
-     * child ColumnSpec-s.
-     * 
- * - * int64 column_count = 7; - * - * @return This builder for chaining. - */ - public Builder clearColumnCount() { - - columnCount_ = 0L; - onChanged(); - return this; - } - - private java.util.List inputConfigs_ = - java.util.Collections.emptyList(); - - private void ensureInputConfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - inputConfigs_ = - new java.util.ArrayList(inputConfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder> - inputConfigsBuilder_; - - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public java.util.List getInputConfigsList() { - if (inputConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputConfigs_); - } else { - return inputConfigsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public int getInputConfigsCount() { - if (inputConfigsBuilder_ == null) { - return inputConfigs_.size(); - } else { - return inputConfigsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public com.google.cloud.automl.v1beta1.InputConfig getInputConfigs(int index) { - if (inputConfigsBuilder_ == null) { - return inputConfigs_.get(index); - } else { - return inputConfigsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder setInputConfigs(int index, com.google.cloud.automl.v1beta1.InputConfig value) { - if (inputConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputConfigsIsMutable(); - inputConfigs_.set(index, value); - onChanged(); - } else { - inputConfigsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder setInputConfigs( - int index, com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) { - if (inputConfigsBuilder_ == null) { - ensureInputConfigsIsMutable(); - inputConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - inputConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder addInputConfigs(com.google.cloud.automl.v1beta1.InputConfig value) { - if (inputConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputConfigsIsMutable(); - inputConfigs_.add(value); - onChanged(); - } else { - inputConfigsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder addInputConfigs(int index, com.google.cloud.automl.v1beta1.InputConfig value) { - if (inputConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputConfigsIsMutable(); - inputConfigs_.add(index, value); - onChanged(); - } else { - inputConfigsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder addInputConfigs( - com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) { - if (inputConfigsBuilder_ == null) { - ensureInputConfigsIsMutable(); - inputConfigs_.add(builderForValue.build()); - onChanged(); - } else { - inputConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder addInputConfigs( - int index, com.google.cloud.automl.v1beta1.InputConfig.Builder builderForValue) { - if (inputConfigsBuilder_ == null) { - ensureInputConfigsIsMutable(); - inputConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - inputConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder addAllInputConfigs( - java.lang.Iterable values) { - if (inputConfigsBuilder_ == null) { - ensureInputConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputConfigs_); - onChanged(); - } else { - inputConfigsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder clearInputConfigs() { - if (inputConfigsBuilder_ == null) { - inputConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - inputConfigsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public Builder removeInputConfigs(int index) { - if (inputConfigsBuilder_ == null) { - ensureInputConfigsIsMutable(); - inputConfigs_.remove(index); - onChanged(); - } else { - inputConfigsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public com.google.cloud.automl.v1beta1.InputConfig.Builder getInputConfigsBuilder(int index) { - return getInputConfigsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder( - int index) { - if (inputConfigsBuilder_ == null) { - return inputConfigs_.get(index); - } else { - return inputConfigsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public java.util.List - getInputConfigsOrBuilderList() { - if (inputConfigsBuilder_ != null) { - return inputConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputConfigs_); - } - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public com.google.cloud.automl.v1beta1.InputConfig.Builder addInputConfigsBuilder() { - return getInputConfigsFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public com.google.cloud.automl.v1beta1.InputConfig.Builder addInputConfigsBuilder(int index) { - return getInputConfigsFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.InputConfig.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Input configs via which data currently residing in the table
-     * had been imported.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - public java.util.List - getInputConfigsBuilderList() { - return getInputConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder> - getInputConfigsFieldBuilder() { - if (inputConfigsBuilder_ == null) { - inputConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.InputConfig, - com.google.cloud.automl.v1beta1.InputConfig.Builder, - com.google.cloud.automl.v1beta1.InputConfigOrBuilder>( - inputConfigs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - inputConfigs_ = null; - } - return inputConfigsBuilder_; - } - - 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; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TableSpec) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TableSpec) - private static final com.google.cloud.automl.v1beta1.TableSpec DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TableSpec(); - } - - public static com.google.cloud.automl.v1beta1.TableSpec getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TableSpec parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TableSpec(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TableSpec getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java deleted file mode 100644 index 77b1685cb..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.cloud.automl.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** AUTO-GENERATED DOCUMENTATION AND CLASS */ -@javax.annotation.Generated("by GAPIC protoc plugin") -public class TableSpecName implements ResourceName { - - private static final PathTemplate PATH_TEMPLATE = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}"); - - private volatile Map fieldValuesMap; - - private final String project; - private final String location; - private final String dataset; - private final String tableSpec; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataset() { - return dataset; - } - - public String getTableSpec() { - return tableSpec; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - private TableSpecName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = Preconditions.checkNotNull(builder.getLocation()); - dataset = Preconditions.checkNotNull(builder.getDataset()); - tableSpec = Preconditions.checkNotNull(builder.getTableSpec()); - } - - public static TableSpecName of( - String project, String location, String dataset, String tableSpec) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataset(dataset) - .setTableSpec(tableSpec) - .build(); - } - - public static String format(String project, String location, String dataset, String tableSpec) { - return newBuilder() - .setProject(project) - .setLocation(location) - .setDataset(dataset) - .setTableSpec(tableSpec) - .build() - .toString(); - } - - public static TableSpecName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PATH_TEMPLATE.validatedMatch( - formattedString, "TableSpecName.parse: formattedString not in valid format"); - return of( - matchMap.get("project"), - matchMap.get("location"), - matchMap.get("dataset"), - matchMap.get("table_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 (TableSpecName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PATH_TEMPLATE.matches(formattedString); - } - - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - fieldMapBuilder.put("project", project); - fieldMapBuilder.put("location", location); - fieldMapBuilder.put("dataset", dataset); - fieldMapBuilder.put("tableSpec", tableSpec); - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PATH_TEMPLATE.instantiate( - "project", project, "location", location, "dataset", dataset, "table_spec", tableSpec); - } - - /** Builder for TableSpecName. */ - public static class Builder { - - private String project; - private String location; - private String dataset; - private String tableSpec; - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public String getDataset() { - return dataset; - } - - public String getTableSpec() { - return tableSpec; - } - - 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 setTableSpec(String tableSpec) { - this.tableSpec = tableSpec; - return this; - } - - private Builder() {} - - private Builder(TableSpecName tableSpecName) { - project = tableSpecName.project; - location = tableSpecName.location; - dataset = tableSpecName.dataset; - tableSpec = tableSpecName.tableSpec; - } - - public TableSpecName build() { - return new TableSpecName(this); - } - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o instanceof TableSpecName) { - TableSpecName that = (TableSpecName) o; - return (this.project.equals(that.project)) - && (this.location.equals(that.location)) - && (this.dataset.equals(that.dataset)) - && (this.tableSpec.equals(that.tableSpec)); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= project.hashCode(); - h *= 1000003; - h ^= location.hashCode(); - h *= 1000003; - h ^= dataset.hashCode(); - h *= 1000003; - h ^= tableSpec.hashCode(); - return h; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOrBuilder.java deleted file mode 100644 index b57b8be45..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOrBuilder.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/table_spec.proto - -package com.google.cloud.automl.v1beta1; - -public interface TableSpecOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TableSpec) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The resource name of the table spec.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name of the table spec.
-   * Form:
-   * `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}`
-   * 
- * - * string name = 1; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * column_spec_id of the time column. Only used if the parent dataset's
-   * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-   * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-   * those in between to VALIDATE.
-   * Required type: TIMESTAMP.
-   * If both this column and ml_use_column are not set, then ML use of all rows
-   * will be assigned by AutoML. NOTE: Updates of this field will instantly
-   * affect any other users concurrently working with the dataset.
-   * 
- * - * string time_column_spec_id = 2; - * - * @return The timeColumnSpecId. - */ - java.lang.String getTimeColumnSpecId(); - /** - * - * - *
-   * column_spec_id of the time column. Only used if the parent dataset's
-   * ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE
-   * and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and
-   * those in between to VALIDATE.
-   * Required type: TIMESTAMP.
-   * If both this column and ml_use_column are not set, then ML use of all rows
-   * will be assigned by AutoML. NOTE: Updates of this field will instantly
-   * affect any other users concurrently working with the dataset.
-   * 
- * - * string time_column_spec_id = 2; - * - * @return The bytes for timeColumnSpecId. - */ - com.google.protobuf.ByteString getTimeColumnSpecIdBytes(); - - /** - * - * - *
-   * Output only. The number of rows (i.e. examples) in the table.
-   * 
- * - * int64 row_count = 3; - * - * @return The rowCount. - */ - long getRowCount(); - - /** - * - * - *
-   * Output only. The number of valid rows (i.e. without values that don't match
-   * DataType-s of their columns).
-   * 
- * - * int64 valid_row_count = 4; - * - * @return The validRowCount. - */ - long getValidRowCount(); - - /** - * - * - *
-   * Output only. The number of columns of the table. That is, the number of
-   * child ColumnSpec-s.
-   * 
- * - * int64 column_count = 7; - * - * @return The columnCount. - */ - long getColumnCount(); - - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - java.util.List getInputConfigsList(); - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - com.google.cloud.automl.v1beta1.InputConfig getInputConfigs(int index); - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - int getInputConfigsCount(); - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - java.util.List - getInputConfigsOrBuilderList(); - /** - * - * - *
-   * Output only. Input configs via which data currently residing in the table
-   * had been imported.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.InputConfig input_configs = 5; - */ - com.google.cloud.automl.v1beta1.InputConfigOrBuilder getInputConfigsOrBuilder(int index); - - /** - * - * - *
-   * 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(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOuterClass.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOuterClass.java deleted file mode 100644 index c0d3ac028..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecOuterClass.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/table_spec.proto - -package com.google.cloud.automl.v1beta1; - -public final class TableSpecOuterClass { - private TableSpecOuterClass() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TableSpec_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n,google/cloud/automl/v1beta1/table_spec" - + ".proto\022\033google.cloud.automl.v1beta1\032\031goo" - + "gle/api/resource.proto\032$google/cloud/aut" - + "oml/v1beta1/io.proto\032\034google/api/annotat" - + "ions.proto\"\301\002\n\tTableSpec\022\014\n\004name\030\001 \001(\t\022\033" - + "\n\023time_column_spec_id\030\002 \001(\t\022\021\n\trow_count" - + "\030\003 \001(\003\022\027\n\017valid_row_count\030\004 \001(\003\022\024\n\014colum" - + "n_count\030\007 \001(\003\022?\n\rinput_configs\030\005 \003(\0132(.g" - + "oogle.cloud.automl.v1beta1.InputConfig\022\014" - + "\n\004etag\030\006 \001(\t:x\352Au\n\037automl.googleapis.com" - + "/TableSpec\022Rprojects/{project}/locations" - + "/{location}/datasets/{dataset}/tableSpec" - + "s/{table_spec}B\245\001\n\037com.google.cloud.auto" - + "ml.v1beta1P\001ZAgoogle.golang.org/genproto" - + "/googleapis/cloud/automl/v1beta1;automl\312" - + "\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002\036Google::" - + "Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Io.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TableSpec_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TableSpec_descriptor, - new java.lang.String[] { - "Name", - "TimeColumnSpecId", - "RowCount", - "ValidRowCount", - "ColumnCount", - "InputConfigs", - "Etag", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Io.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Tables.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Tables.java deleted file mode 100644 index 29290c64b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Tables.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -public final class Tables { - private Tables() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_TargetColumnCorrelationsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_TargetColumnCorrelationsEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TablesAnnotation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TablesAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n(google/cloud/automl/v1beta1/tables.pro" - + "to\022\033google.cloud.automl.v1beta1\0320google/" - + "cloud/automl/v1beta1/classification.prot" - + "o\032-google/cloud/automl/v1beta1/column_sp" - + "ec.proto\032,google/cloud/automl/v1beta1/da" - + "ta_items.proto\032,google/cloud/automl/v1be" - + "ta1/data_stats.proto\032(google/cloud/autom" - + "l/v1beta1/ranges.proto\032,google/cloud/aut" - + "oml/v1beta1/regression.proto\032*google/clo" - + "ud/automl/v1beta1/temporal.proto\032\034google" - + "/protobuf/struct.proto\032\037google/protobuf/" - + "timestamp.proto\032\034google/api/annotations." - + "proto\"\260\003\n\025TablesDatasetMetadata\022\035\n\025prima" - + "ry_table_spec_id\030\001 \001(\t\022\035\n\025target_column_" - + "spec_id\030\002 \001(\t\022\035\n\025weight_column_spec_id\030\003" - + " \001(\t\022\035\n\025ml_use_column_spec_id\030\004 \001(\t\022t\n\032t" - + "arget_column_correlations\030\006 \003(\0132P.google" - + ".cloud.automl.v1beta1.TablesDatasetMetad" - + "ata.TargetColumnCorrelationsEntry\0225\n\021sta" - + "ts_update_time\030\007 \001(\0132\032.google.protobuf.T" - + "imestamp\032n\n\035TargetColumnCorrelationsEntr" - + "y\022\013\n\003key\030\001 \001(\t\022<\n\005value\030\002 \001(\0132-.google.c" - + "loud.automl.v1beta1.CorrelationStats:\0028\001" - + "\"\226\004\n\023TablesModelMetadata\022-\n#optimization" - + "_objective_recall_value\030\021 \001(\002H\000\0220\n&optim" - + "ization_objective_precision_value\030\022 \001(\002H" - + "\000\022C\n\022target_column_spec\030\002 \001(\0132\'.google.c" - + "loud.automl.v1beta1.ColumnSpec\022K\n\032input_" - + "feature_column_specs\030\003 \003(\0132\'.google.clou" - + "d.automl.v1beta1.ColumnSpec\022\036\n\026optimizat" - + "ion_objective\030\004 \001(\t\022T\n\030tables_model_colu" - + "mn_info\030\005 \003(\01322.google.cloud.automl.v1be" - + "ta1.TablesModelColumnInfo\022%\n\035train_budge" - + "t_milli_node_hours\030\006 \001(\003\022#\n\033train_cost_m" - + "illi_node_hours\030\007 \001(\003\022\036\n\026disable_early_s" - + "topping\030\014 \001(\010B*\n(additional_optimization" - + "_objective_config\"\375\001\n\020TablesAnnotation\022\r" - + "\n\005score\030\001 \001(\002\022E\n\023prediction_interval\030\004 \001" - + "(\0132(.google.cloud.automl.v1beta1.DoubleR" - + "ange\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Va" - + "lue\022T\n\030tables_model_column_info\030\003 \003(\01322." - + "google.cloud.automl.v1beta1.TablesModelC" - + "olumnInfo\022\026\n\016baseline_score\030\005 \001(\002\"j\n\025Tab" - + "lesModelColumnInfo\022\030\n\020column_spec_name\030\001" - + " \001(\t\022\033\n\023column_display_name\030\002 \001(\t\022\032\n\022fea" - + "ture_importance\030\003 \001(\002B\245\001\n\037com.google.clo" - + "ud.automl.v1beta1P\001ZAgoogle.golang.org/g" - + "enproto/googleapis/cloud/automl/v1beta1;" - + "automl\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002\036G" - + "oogle::Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), - com.google.cloud.automl.v1beta1.ColumnSpecOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.DataItems.getDescriptor(), - com.google.cloud.automl.v1beta1.DataStatsOuterClass.getDescriptor(), - com.google.cloud.automl.v1beta1.RangesProto.getDescriptor(), - com.google.cloud.automl.v1beta1.RegressionProto.getDescriptor(), - com.google.cloud.automl.v1beta1.Temporal.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_descriptor, - new java.lang.String[] { - "PrimaryTableSpecId", - "TargetColumnSpecId", - "WeightColumnSpecId", - "MlUseColumnSpecId", - "TargetColumnCorrelations", - "StatsUpdateTime", - }); - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_TargetColumnCorrelationsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_TargetColumnCorrelationsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_TargetColumnCorrelationsEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_descriptor, - new java.lang.String[] { - "OptimizationObjectiveRecallValue", - "OptimizationObjectivePrecisionValue", - "TargetColumnSpec", - "InputFeatureColumnSpecs", - "OptimizationObjective", - "TablesModelColumnInfo", - "TrainBudgetMilliNodeHours", - "TrainCostMilliNodeHours", - "DisableEarlyStopping", - "AdditionalOptimizationObjectiveConfig", - }); - internal_static_google_cloud_automl_v1beta1_TablesAnnotation_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_TablesAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TablesAnnotation_descriptor, - new java.lang.String[] { - "Score", "PredictionInterval", "Value", "TablesModelColumnInfo", "BaselineScore", - }); - internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_descriptor, - new java.lang.String[] { - "ColumnSpecName", "ColumnDisplayName", "FeatureImportance", - }); - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); - com.google.cloud.automl.v1beta1.ColumnSpecOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.DataItems.getDescriptor(); - com.google.cloud.automl.v1beta1.DataStatsOuterClass.getDescriptor(); - com.google.cloud.automl.v1beta1.RangesProto.getDescriptor(); - com.google.cloud.automl.v1beta1.RegressionProto.getDescriptor(); - com.google.cloud.automl.v1beta1.Temporal.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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotation.java deleted file mode 100644 index 434ed8211..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotation.java +++ /dev/null @@ -1,2021 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Contains annotation details specific to Tables.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TablesAnnotation} - */ -public final class TablesAnnotation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TablesAnnotation) - TablesAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use TablesAnnotation.newBuilder() to construct. - private TablesAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TablesAnnotation() { - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TablesAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TablesAnnotation( - 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 13: - { - score_ = input.readFloat(); - 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; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - tablesModelColumnInfo_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo>(); - mutable_bitField0_ |= 0x00000001; - } - tablesModelColumnInfo_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.parser(), - extensionRegistry)); - break; - } - case 34: - { - com.google.cloud.automl.v1beta1.DoubleRange.Builder subBuilder = null; - if (predictionInterval_ != null) { - subBuilder = predictionInterval_.toBuilder(); - } - predictionInterval_ = - input.readMessage( - com.google.cloud.automl.v1beta1.DoubleRange.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(predictionInterval_); - predictionInterval_ = subBuilder.buildPartial(); - } - - break; - } - case 45: - { - baselineScore_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - tablesModelColumnInfo_ = java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesAnnotation.class, - com.google.cloud.automl.v1beta1.TablesAnnotation.Builder.class); - } - - public static final int SCORE_FIELD_NUMBER = 1; - private float score_; - /** - * - * - *
-   * Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher
-   * value means greater confidence in the returned value.
-   * For
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * of FLOAT64 data type the score is not populated.
-   * 
- * - * float score = 1; - * - * @return The score. - */ - public float getScore() { - return score_; - } - - public static final int PREDICTION_INTERVAL_FIELD_NUMBER = 4; - private com.google.cloud.automl.v1beta1.DoubleRange predictionInterval_; - /** - * - * - *
-   * Output only. Only populated when
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * has FLOAT64 data type. An interval in which the exactly correct target
-   * value has 95% chance to be in.
-   * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - * - * @return Whether the predictionInterval field is set. - */ - public boolean hasPredictionInterval() { - return predictionInterval_ != null; - } - /** - * - * - *
-   * Output only. Only populated when
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * has FLOAT64 data type. An interval in which the exactly correct target
-   * value has 95% chance to be in.
-   * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - * - * @return The predictionInterval. - */ - public com.google.cloud.automl.v1beta1.DoubleRange getPredictionInterval() { - return predictionInterval_ == null - ? com.google.cloud.automl.v1beta1.DoubleRange.getDefaultInstance() - : predictionInterval_; - } - /** - * - * - *
-   * Output only. Only populated when
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * has FLOAT64 data type. An interval in which the exactly correct target
-   * value has 95% chance to be in.
-   * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - public com.google.cloud.automl.v1beta1.DoubleRangeOrBuilder getPredictionIntervalOrBuilder() { - return getPredictionInterval(); - } - - public static final int VALUE_FIELD_NUMBER = 2; - private com.google.protobuf.Value value_; - /** - * - * - *
-   * The predicted value of the row's
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-   * The value depends on the column's DataType:
-   * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-   *   value.
-   * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-   * 
- * - * .google.protobuf.Value value = 2; - * - * @return Whether the value field is set. - */ - public boolean hasValue() { - return value_ != null; - } - /** - * - * - *
-   * The predicted value of the row's
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-   * The value depends on the column's DataType:
-   * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-   *   value.
-   * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-   * 
- * - * .google.protobuf.Value value = 2; - * - * @return The value. - */ - public com.google.protobuf.Value getValue() { - return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; - } - /** - * - * - *
-   * The predicted value of the row's
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-   * The value depends on the column's DataType:
-   * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-   *   value.
-   * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-   * 
- * - * .google.protobuf.Value value = 2; - */ - public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { - return getValue(); - } - - public static final int TABLES_MODEL_COLUMN_INFO_FIELD_NUMBER = 3; - private java.util.List - tablesModelColumnInfo_; - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public java.util.List - getTablesModelColumnInfoList() { - return tablesModelColumnInfo_; - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public java.util.List - getTablesModelColumnInfoOrBuilderList() { - return tablesModelColumnInfo_; - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public int getTablesModelColumnInfoCount() { - return tablesModelColumnInfo_.size(); - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo getTablesModelColumnInfo(int index) { - return tablesModelColumnInfo_.get(index); - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder - getTablesModelColumnInfoOrBuilder(int index) { - return tablesModelColumnInfo_.get(index); - } - - public static final int BASELINE_SCORE_FIELD_NUMBER = 5; - private float baselineScore_; - /** - * - * - *
-   * Output only. Stores the prediction score for the baseline example, which
-   * is defined as the example with all values set to their baseline values.
-   * This is used as part of the Sampled Shapley explanation of the model's
-   * prediction. This field is populated only when feature importance is
-   * requested. For regression models, this holds the baseline prediction for
-   * the baseline example. For classification models, this holds the baseline
-   * prediction for the baseline example for the argmax class.
-   * 
- * - * float baseline_score = 5; - * - * @return The baselineScore. - */ - public float getBaselineScore() { - return baselineScore_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (score_ != 0F) { - output.writeFloat(1, score_); - } - if (value_ != null) { - output.writeMessage(2, getValue()); - } - for (int i = 0; i < tablesModelColumnInfo_.size(); i++) { - output.writeMessage(3, tablesModelColumnInfo_.get(i)); - } - if (predictionInterval_ != null) { - output.writeMessage(4, getPredictionInterval()); - } - if (baselineScore_ != 0F) { - output.writeFloat(5, baselineScore_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); - } - if (value_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); - } - for (int i = 0; i < tablesModelColumnInfo_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, tablesModelColumnInfo_.get(i)); - } - if (predictionInterval_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPredictionInterval()); - } - if (baselineScore_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, baselineScore_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TablesAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TablesAnnotation other = - (com.google.cloud.automl.v1beta1.TablesAnnotation) obj; - - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits(other.getScore())) return false; - if (hasPredictionInterval() != other.hasPredictionInterval()) return false; - if (hasPredictionInterval()) { - if (!getPredictionInterval().equals(other.getPredictionInterval())) return false; - } - if (hasValue() != other.hasValue()) return false; - if (hasValue()) { - if (!getValue().equals(other.getValue())) return false; - } - if (!getTablesModelColumnInfoList().equals(other.getTablesModelColumnInfoList())) return false; - if (java.lang.Float.floatToIntBits(getBaselineScore()) - != java.lang.Float.floatToIntBits(other.getBaselineScore())) return false; - if (!unknownFields.equals(other.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) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); - if (hasPredictionInterval()) { - hash = (37 * hash) + PREDICTION_INTERVAL_FIELD_NUMBER; - hash = (53 * hash) + getPredictionInterval().hashCode(); - } - if (hasValue()) { - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - } - if (getTablesModelColumnInfoCount() > 0) { - hash = (37 * hash) + TABLES_MODEL_COLUMN_INFO_FIELD_NUMBER; - hash = (53 * hash) + getTablesModelColumnInfoList().hashCode(); - } - hash = (37 * hash) + BASELINE_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getBaselineScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.TablesAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Contains annotation details specific to Tables.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TablesAnnotation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TablesAnnotation) - com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesAnnotation.class, - com.google.cloud.automl.v1beta1.TablesAnnotation.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TablesAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTablesModelColumnInfoFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - score_ = 0F; - - if (predictionIntervalBuilder_ == null) { - predictionInterval_ = null; - } else { - predictionInterval_ = null; - predictionIntervalBuilder_ = null; - } - if (valueBuilder_ == null) { - value_ = null; - } else { - value_ = null; - valueBuilder_ = null; - } - if (tablesModelColumnInfoBuilder_ == null) { - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - tablesModelColumnInfoBuilder_.clear(); - } - baselineScore_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesAnnotation getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesAnnotation build() { - com.google.cloud.automl.v1beta1.TablesAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesAnnotation buildPartial() { - com.google.cloud.automl.v1beta1.TablesAnnotation result = - new com.google.cloud.automl.v1beta1.TablesAnnotation(this); - int from_bitField0_ = bitField0_; - result.score_ = score_; - if (predictionIntervalBuilder_ == null) { - result.predictionInterval_ = predictionInterval_; - } else { - result.predictionInterval_ = predictionIntervalBuilder_.build(); - } - if (valueBuilder_ == null) { - result.value_ = value_; - } else { - result.value_ = valueBuilder_.build(); - } - if (tablesModelColumnInfoBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - tablesModelColumnInfo_ = java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.tablesModelColumnInfo_ = tablesModelColumnInfo_; - } else { - result.tablesModelColumnInfo_ = tablesModelColumnInfoBuilder_.build(); - } - result.baselineScore_ = baselineScore_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TablesAnnotation) { - return mergeFrom((com.google.cloud.automl.v1beta1.TablesAnnotation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TablesAnnotation other) { - if (other == com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance()) - return this; - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - if (other.hasPredictionInterval()) { - mergePredictionInterval(other.getPredictionInterval()); - } - if (other.hasValue()) { - mergeValue(other.getValue()); - } - if (tablesModelColumnInfoBuilder_ == null) { - if (!other.tablesModelColumnInfo_.isEmpty()) { - if (tablesModelColumnInfo_.isEmpty()) { - tablesModelColumnInfo_ = other.tablesModelColumnInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.addAll(other.tablesModelColumnInfo_); - } - onChanged(); - } - } else { - if (!other.tablesModelColumnInfo_.isEmpty()) { - if (tablesModelColumnInfoBuilder_.isEmpty()) { - tablesModelColumnInfoBuilder_.dispose(); - tablesModelColumnInfoBuilder_ = null; - tablesModelColumnInfo_ = other.tablesModelColumnInfo_; - bitField0_ = (bitField0_ & ~0x00000001); - tablesModelColumnInfoBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTablesModelColumnInfoFieldBuilder() - : null; - } else { - tablesModelColumnInfoBuilder_.addAllMessages(other.tablesModelColumnInfo_); - } - } - } - if (other.getBaselineScore() != 0F) { - setBaselineScore(other.getBaselineScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TablesAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.TablesAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private float score_; - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher
-     * value means greater confidence in the returned value.
-     * For
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * of FLOAT64 data type the score is not populated.
-     * 
- * - * float score = 1; - * - * @return The score. - */ - public float getScore() { - return score_; - } - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher
-     * value means greater confidence in the returned value.
-     * For
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * of FLOAT64 data type the score is not populated.
-     * 
- * - * float score = 1; - * - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher
-     * value means greater confidence in the returned value.
-     * For
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * of FLOAT64 data type the score is not populated.
-     * 
- * - * float score = 1; - * - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.automl.v1beta1.DoubleRange predictionInterval_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DoubleRange, - com.google.cloud.automl.v1beta1.DoubleRange.Builder, - com.google.cloud.automl.v1beta1.DoubleRangeOrBuilder> - predictionIntervalBuilder_; - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - * - * @return Whether the predictionInterval field is set. - */ - public boolean hasPredictionInterval() { - return predictionIntervalBuilder_ != null || predictionInterval_ != null; - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - * - * @return The predictionInterval. - */ - public com.google.cloud.automl.v1beta1.DoubleRange getPredictionInterval() { - if (predictionIntervalBuilder_ == null) { - return predictionInterval_ == null - ? com.google.cloud.automl.v1beta1.DoubleRange.getDefaultInstance() - : predictionInterval_; - } else { - return predictionIntervalBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - public Builder setPredictionInterval(com.google.cloud.automl.v1beta1.DoubleRange value) { - if (predictionIntervalBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - predictionInterval_ = value; - onChanged(); - } else { - predictionIntervalBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - public Builder setPredictionInterval( - com.google.cloud.automl.v1beta1.DoubleRange.Builder builderForValue) { - if (predictionIntervalBuilder_ == null) { - predictionInterval_ = builderForValue.build(); - onChanged(); - } else { - predictionIntervalBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - public Builder mergePredictionInterval(com.google.cloud.automl.v1beta1.DoubleRange value) { - if (predictionIntervalBuilder_ == null) { - if (predictionInterval_ != null) { - predictionInterval_ = - com.google.cloud.automl.v1beta1.DoubleRange.newBuilder(predictionInterval_) - .mergeFrom(value) - .buildPartial(); - } else { - predictionInterval_ = value; - } - onChanged(); - } else { - predictionIntervalBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - public Builder clearPredictionInterval() { - if (predictionIntervalBuilder_ == null) { - predictionInterval_ = null; - onChanged(); - } else { - predictionInterval_ = null; - predictionIntervalBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - public com.google.cloud.automl.v1beta1.DoubleRange.Builder getPredictionIntervalBuilder() { - - onChanged(); - return getPredictionIntervalFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - public com.google.cloud.automl.v1beta1.DoubleRangeOrBuilder getPredictionIntervalOrBuilder() { - if (predictionIntervalBuilder_ != null) { - return predictionIntervalBuilder_.getMessageOrBuilder(); - } else { - return predictionInterval_ == null - ? com.google.cloud.automl.v1beta1.DoubleRange.getDefaultInstance() - : predictionInterval_; - } - } - /** - * - * - *
-     * Output only. Only populated when
-     * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * has FLOAT64 data type. An interval in which the exactly correct target
-     * value has 95% chance to be in.
-     * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DoubleRange, - com.google.cloud.automl.v1beta1.DoubleRange.Builder, - com.google.cloud.automl.v1beta1.DoubleRangeOrBuilder> - getPredictionIntervalFieldBuilder() { - if (predictionIntervalBuilder_ == null) { - predictionIntervalBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.DoubleRange, - com.google.cloud.automl.v1beta1.DoubleRange.Builder, - com.google.cloud.automl.v1beta1.DoubleRangeOrBuilder>( - getPredictionInterval(), getParentForChildren(), isClean()); - predictionInterval_ = null; - } - return predictionIntervalBuilder_; - } - - 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_; - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - * - * @return Whether the value field is set. - */ - public boolean hasValue() { - return valueBuilder_ != null || value_ != null; - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - * - * @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(); - } - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - */ - 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; - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - */ - public Builder setValue(com.google.protobuf.Value.Builder builderForValue) { - if (valueBuilder_ == null) { - value_ = builderForValue.build(); - onChanged(); - } else { - valueBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - */ - 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; - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - */ - public Builder clearValue() { - if (valueBuilder_ == null) { - value_ = null; - onChanged(); - } else { - value_ = null; - valueBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - */ - public com.google.protobuf.Value.Builder getValueBuilder() { - - onChanged(); - return getValueFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - */ - public com.google.protobuf.ValueOrBuilder getValueOrBuilder() { - if (valueBuilder_ != null) { - return valueBuilder_.getMessageOrBuilder(); - } else { - return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_; - } - } - /** - * - * - *
-     * The predicted value of the row's
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-     * The value depends on the column's DataType:
-     * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-     *   value.
-     * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-     * 
- * - * .google.protobuf.Value value = 2; - */ - 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_; - } - - private java.util.List - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - - private void ensureTablesModelColumnInfoIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - tablesModelColumnInfo_ = - new java.util.ArrayList( - tablesModelColumnInfo_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder, - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder> - tablesModelColumnInfoBuilder_; - - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public java.util.List - getTablesModelColumnInfoList() { - if (tablesModelColumnInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - } else { - return tablesModelColumnInfoBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public int getTablesModelColumnInfoCount() { - if (tablesModelColumnInfoBuilder_ == null) { - return tablesModelColumnInfo_.size(); - } else { - return tablesModelColumnInfoBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo getTablesModelColumnInfo( - int index) { - if (tablesModelColumnInfoBuilder_ == null) { - return tablesModelColumnInfo_.get(index); - } else { - return tablesModelColumnInfoBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder setTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo value) { - if (tablesModelColumnInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.set(index, value); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder setTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder builderForValue) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder addTablesModelColumnInfo( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo value) { - if (tablesModelColumnInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(value); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder addTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo value) { - if (tablesModelColumnInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(index, value); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder addTablesModelColumnInfo( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder builderForValue) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(builderForValue.build()); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder addTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder builderForValue) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder addAllTablesModelColumnInfo( - java.lang.Iterable - values) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tablesModelColumnInfo_); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder clearTablesModelColumnInfo() { - if (tablesModelColumnInfoBuilder_ == null) { - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public Builder removeTablesModelColumnInfo(int index) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.remove(index); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder - getTablesModelColumnInfoBuilder(int index) { - return getTablesModelColumnInfoFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder - getTablesModelColumnInfoOrBuilder(int index) { - if (tablesModelColumnInfoBuilder_ == null) { - return tablesModelColumnInfo_.get(index); - } else { - return tablesModelColumnInfoBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public java.util.List - getTablesModelColumnInfoOrBuilderList() { - if (tablesModelColumnInfoBuilder_ != null) { - return tablesModelColumnInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder - addTablesModelColumnInfoBuilder() { - return getTablesModelColumnInfoFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.TablesModelColumnInfo.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder - addTablesModelColumnInfoBuilder(int index) { - return getTablesModelColumnInfoFieldBuilder() - .addBuilder( - index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the model's
-     * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-     * with respect to this particular prediction.
-     * If no other fields than
-     * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-     * and
-     * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-     * would be populated, then this whole field is not.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - public java.util.List - getTablesModelColumnInfoBuilderList() { - return getTablesModelColumnInfoFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder, - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder> - getTablesModelColumnInfoFieldBuilder() { - if (tablesModelColumnInfoBuilder_ == null) { - tablesModelColumnInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder, - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder>( - tablesModelColumnInfo_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - tablesModelColumnInfo_ = null; - } - return tablesModelColumnInfoBuilder_; - } - - private float baselineScore_; - /** - * - * - *
-     * Output only. Stores the prediction score for the baseline example, which
-     * is defined as the example with all values set to their baseline values.
-     * This is used as part of the Sampled Shapley explanation of the model's
-     * prediction. This field is populated only when feature importance is
-     * requested. For regression models, this holds the baseline prediction for
-     * the baseline example. For classification models, this holds the baseline
-     * prediction for the baseline example for the argmax class.
-     * 
- * - * float baseline_score = 5; - * - * @return The baselineScore. - */ - public float getBaselineScore() { - return baselineScore_; - } - /** - * - * - *
-     * Output only. Stores the prediction score for the baseline example, which
-     * is defined as the example with all values set to their baseline values.
-     * This is used as part of the Sampled Shapley explanation of the model's
-     * prediction. This field is populated only when feature importance is
-     * requested. For regression models, this holds the baseline prediction for
-     * the baseline example. For classification models, this holds the baseline
-     * prediction for the baseline example for the argmax class.
-     * 
- * - * float baseline_score = 5; - * - * @param value The baselineScore to set. - * @return This builder for chaining. - */ - public Builder setBaselineScore(float value) { - - baselineScore_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Stores the prediction score for the baseline example, which
-     * is defined as the example with all values set to their baseline values.
-     * This is used as part of the Sampled Shapley explanation of the model's
-     * prediction. This field is populated only when feature importance is
-     * requested. For regression models, this holds the baseline prediction for
-     * the baseline example. For classification models, this holds the baseline
-     * prediction for the baseline example for the argmax class.
-     * 
- * - * float baseline_score = 5; - * - * @return This builder for chaining. - */ - public Builder clearBaselineScore() { - - baselineScore_ = 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.automl.v1beta1.TablesAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TablesAnnotation) - private static final com.google.cloud.automl.v1beta1.TablesAnnotation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TablesAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.TablesAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TablesAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TablesAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotationOrBuilder.java deleted file mode 100644 index 674df0db9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesAnnotationOrBuilder.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -public interface TablesAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TablesAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher
-   * value means greater confidence in the returned value.
-   * For
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * of FLOAT64 data type the score is not populated.
-   * 
- * - * float score = 1; - * - * @return The score. - */ - float getScore(); - - /** - * - * - *
-   * Output only. Only populated when
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * has FLOAT64 data type. An interval in which the exactly correct target
-   * value has 95% chance to be in.
-   * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - * - * @return Whether the predictionInterval field is set. - */ - boolean hasPredictionInterval(); - /** - * - * - *
-   * Output only. Only populated when
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * has FLOAT64 data type. An interval in which the exactly correct target
-   * value has 95% chance to be in.
-   * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - * - * @return The predictionInterval. - */ - com.google.cloud.automl.v1beta1.DoubleRange getPredictionInterval(); - /** - * - * - *
-   * Output only. Only populated when
-   * [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * has FLOAT64 data type. An interval in which the exactly correct target
-   * value has 95% chance to be in.
-   * 
- * - * .google.cloud.automl.v1beta1.DoubleRange prediction_interval = 4; - */ - com.google.cloud.automl.v1beta1.DoubleRangeOrBuilder getPredictionIntervalOrBuilder(); - - /** - * - * - *
-   * The predicted value of the row's
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-   * The value depends on the column's DataType:
-   * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-   *   value.
-   * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-   * 
- * - * .google.protobuf.Value value = 2; - * - * @return Whether the value field is set. - */ - boolean hasValue(); - /** - * - * - *
-   * The predicted value of the row's
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-   * The value depends on the column's DataType:
-   * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-   *   value.
-   * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-   * 
- * - * .google.protobuf.Value value = 2; - * - * @return The value. - */ - com.google.protobuf.Value getValue(); - /** - * - * - *
-   * The predicted value of the row's
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec].
-   * The value depends on the column's DataType:
-   * * CATEGORY - the predicted (with the above confidence `score`) CATEGORY
-   *   value.
-   * * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value.
-   * 
- * - * .google.protobuf.Value value = 2; - */ - com.google.protobuf.ValueOrBuilder getValueOrBuilder(); - - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - java.util.List - getTablesModelColumnInfoList(); - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - com.google.cloud.automl.v1beta1.TablesModelColumnInfo getTablesModelColumnInfo(int index); - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - int getTablesModelColumnInfoCount(); - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - java.util.List - getTablesModelColumnInfoOrBuilderList(); - /** - * - * - *
-   * Output only. Auxiliary information for each of the model's
-   * [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs]
-   * with respect to this particular prediction.
-   * If no other fields than
-   * [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name]
-   * and
-   * [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name]
-   * would be populated, then this whole field is not.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 3; - * - */ - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder getTablesModelColumnInfoOrBuilder( - int index); - - /** - * - * - *
-   * Output only. Stores the prediction score for the baseline example, which
-   * is defined as the example with all values set to their baseline values.
-   * This is used as part of the Sampled Shapley explanation of the model's
-   * prediction. This field is populated only when feature importance is
-   * requested. For regression models, this holds the baseline prediction for
-   * the baseline example. For classification models, this holds the baseline
-   * prediction for the baseline example for the argmax class.
-   * 
- * - * float baseline_score = 5; - * - * @return The baselineScore. - */ - float getBaselineScore(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadata.java deleted file mode 100644 index c82264716..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadata.java +++ /dev/null @@ -1,2161 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Metadata for a dataset used for AutoML Tables.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TablesDatasetMetadata} - */ -public final class TablesDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TablesDatasetMetadata) - TablesDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TablesDatasetMetadata.newBuilder() to construct. - private TablesDatasetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TablesDatasetMetadata() { - primaryTableSpecId_ = ""; - targetColumnSpecId_ = ""; - weightColumnSpecId_ = ""; - mlUseColumnSpecId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TablesDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TablesDatasetMetadata( - 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(); - - primaryTableSpecId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetColumnSpecId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - weightColumnSpecId_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - mlUseColumnSpecId_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - targetColumnCorrelations_ = - com.google.protobuf.MapField.newMapField( - TargetColumnCorrelationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - targetColumnCorrelations__ = - input.readMessage( - TargetColumnCorrelationsDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - targetColumnCorrelations_ - .getMutableMap() - .put(targetColumnCorrelations__.getKey(), targetColumnCorrelations__.getValue()); - break; - } - case 58: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (statsUpdateTime_ != null) { - subBuilder = statsUpdateTime_.toBuilder(); - } - statsUpdateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(statsUpdateTime_); - statsUpdateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetTargetColumnCorrelations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder.class); - } - - public static final int PRIMARY_TABLE_SPEC_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object primaryTableSpecId_; - /** - * - * - *
-   * Output only. The table_spec_id of the primary table of this dataset.
-   * 
- * - * string primary_table_spec_id = 1; - * - * @return The primaryTableSpecId. - */ - public java.lang.String getPrimaryTableSpecId() { - java.lang.Object ref = primaryTableSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryTableSpecId_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The table_spec_id of the primary table of this dataset.
-   * 
- * - * string primary_table_spec_id = 1; - * - * @return The bytes for primaryTableSpecId. - */ - public com.google.protobuf.ByteString getPrimaryTableSpecIdBytes() { - java.lang.Object ref = primaryTableSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryTableSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_COLUMN_SPEC_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object targetColumnSpecId_; - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * training & prediction target.
-   * This column must be non-nullable and have one of following data types
-   * (otherwise model creation will error):
-   * * CATEGORY
-   * * FLOAT64
-   * If the type is CATEGORY , only up to
-   * 100 unique values may exist in that column across all rows.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string target_column_spec_id = 2; - * - * @return The targetColumnSpecId. - */ - public java.lang.String getTargetColumnSpecId() { - java.lang.Object ref = targetColumnSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetColumnSpecId_ = s; - return s; - } - } - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * training & prediction target.
-   * This column must be non-nullable and have one of following data types
-   * (otherwise model creation will error):
-   * * CATEGORY
-   * * FLOAT64
-   * If the type is CATEGORY , only up to
-   * 100 unique values may exist in that column across all rows.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string target_column_spec_id = 2; - * - * @return The bytes for targetColumnSpecId. - */ - public com.google.protobuf.ByteString getTargetColumnSpecIdBytes() { - java.lang.Object ref = targetColumnSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int WEIGHT_COLUMN_SPEC_ID_FIELD_NUMBER = 3; - private volatile java.lang.Object weightColumnSpecId_; - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * weight column, i.e. the higher the value the more important the row will be
-   * during model training.
-   * Required type: FLOAT64.
-   * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-   *                 ignored for training.
-   * If not set all rows are assumed to have equal weight of 1.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string weight_column_spec_id = 3; - * - * @return The weightColumnSpecId. - */ - public java.lang.String getWeightColumnSpecId() { - java.lang.Object ref = weightColumnSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - weightColumnSpecId_ = s; - return s; - } - } - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * weight column, i.e. the higher the value the more important the row will be
-   * during model training.
-   * Required type: FLOAT64.
-   * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-   *                 ignored for training.
-   * If not set all rows are assumed to have equal weight of 1.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string weight_column_spec_id = 3; - * - * @return The bytes for weightColumnSpecId. - */ - public com.google.protobuf.ByteString getWeightColumnSpecIdBytes() { - java.lang.Object ref = weightColumnSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - weightColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ML_USE_COLUMN_SPEC_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object mlUseColumnSpecId_; - /** - * - * - *
-   * column_spec_id of the primary table column which specifies a possible ML
-   * use of the row, i.e. the column will be used to split the rows into TRAIN,
-   * VALIDATE and TEST sets.
-   * Required type: STRING.
-   * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-   * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-   * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-   * that if a given ml use distribution makes it impossible to create a "good"
-   * model, that call will error describing the issue.
-   * If both this column_spec_id and primary table's time_column_spec_id are not
-   * set, then all rows are treated as `UNASSIGNED`.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string ml_use_column_spec_id = 4; - * - * @return The mlUseColumnSpecId. - */ - public java.lang.String getMlUseColumnSpecId() { - java.lang.Object ref = mlUseColumnSpecId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mlUseColumnSpecId_ = s; - return s; - } - } - /** - * - * - *
-   * column_spec_id of the primary table column which specifies a possible ML
-   * use of the row, i.e. the column will be used to split the rows into TRAIN,
-   * VALIDATE and TEST sets.
-   * Required type: STRING.
-   * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-   * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-   * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-   * that if a given ml use distribution makes it impossible to create a "good"
-   * model, that call will error describing the issue.
-   * If both this column_spec_id and primary table's time_column_spec_id are not
-   * set, then all rows are treated as `UNASSIGNED`.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string ml_use_column_spec_id = 4; - * - * @return The bytes for mlUseColumnSpecId. - */ - public com.google.protobuf.ByteString getMlUseColumnSpecIdBytes() { - java.lang.Object ref = mlUseColumnSpecId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mlUseColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_COLUMN_CORRELATIONS_FIELD_NUMBER = 6; - - private static final class TargetColumnCorrelationsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_TargetColumnCorrelationsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.automl.v1beta1.CorrelationStats.getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - targetColumnCorrelations_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - internalGetTargetColumnCorrelations() { - if (targetColumnCorrelations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TargetColumnCorrelationsDefaultEntryHolder.defaultEntry); - } - return targetColumnCorrelations_; - } - - public int getTargetColumnCorrelationsCount() { - return internalGetTargetColumnCorrelations().getMap().size(); - } - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public boolean containsTargetColumnCorrelations(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetTargetColumnCorrelations().getMap().containsKey(key); - } - /** Use {@link #getTargetColumnCorrelationsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map - getTargetColumnCorrelations() { - return getTargetColumnCorrelationsMap(); - } - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public java.util.Map - getTargetColumnCorrelationsMap() { - return internalGetTargetColumnCorrelations().getMap(); - } - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public com.google.cloud.automl.v1beta1.CorrelationStats getTargetColumnCorrelationsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.CorrelationStats defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetTargetColumnCorrelations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public com.google.cloud.automl.v1beta1.CorrelationStats getTargetColumnCorrelationsOrThrow( - java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetTargetColumnCorrelations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int STATS_UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp statsUpdateTime_; - /** - * - * - *
-   * Output only. The most recent timestamp when target_column_correlations
-   * field and all descendant ColumnSpec.data_stats and
-   * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-   * changes that happened to the dataset afterwards are not reflected in these
-   * fields values. The regeneration happens in the background on a best effort
-   * basis.
-   * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - * - * @return Whether the statsUpdateTime field is set. - */ - public boolean hasStatsUpdateTime() { - return statsUpdateTime_ != null; - } - /** - * - * - *
-   * Output only. The most recent timestamp when target_column_correlations
-   * field and all descendant ColumnSpec.data_stats and
-   * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-   * changes that happened to the dataset afterwards are not reflected in these
-   * fields values. The regeneration happens in the background on a best effort
-   * basis.
-   * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - * - * @return The statsUpdateTime. - */ - public com.google.protobuf.Timestamp getStatsUpdateTime() { - return statsUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : statsUpdateTime_; - } - /** - * - * - *
-   * Output only. The most recent timestamp when target_column_correlations
-   * field and all descendant ColumnSpec.data_stats and
-   * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-   * changes that happened to the dataset afterwards are not reflected in these
-   * fields values. The regeneration happens in the background on a best effort
-   * basis.
-   * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getStatsUpdateTimeOrBuilder() { - return getStatsUpdateTime(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getPrimaryTableSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, primaryTableSpecId_); - } - if (!getTargetColumnSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetColumnSpecId_); - } - if (!getWeightColumnSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, weightColumnSpecId_); - } - if (!getMlUseColumnSpecIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mlUseColumnSpecId_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetTargetColumnCorrelations(), - TargetColumnCorrelationsDefaultEntryHolder.defaultEntry, - 6); - if (statsUpdateTime_ != null) { - output.writeMessage(7, getStatsUpdateTime()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getPrimaryTableSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, primaryTableSpecId_); - } - if (!getTargetColumnSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetColumnSpecId_); - } - if (!getWeightColumnSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, weightColumnSpecId_); - } - if (!getMlUseColumnSpecIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mlUseColumnSpecId_); - } - for (java.util.Map.Entry - entry : internalGetTargetColumnCorrelations().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - targetColumnCorrelations__ = - TargetColumnCorrelationsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(6, targetColumnCorrelations__); - } - if (statsUpdateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getStatsUpdateTime()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TablesDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TablesDatasetMetadata other = - (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) obj; - - if (!getPrimaryTableSpecId().equals(other.getPrimaryTableSpecId())) return false; - if (!getTargetColumnSpecId().equals(other.getTargetColumnSpecId())) return false; - if (!getWeightColumnSpecId().equals(other.getWeightColumnSpecId())) return false; - if (!getMlUseColumnSpecId().equals(other.getMlUseColumnSpecId())) return false; - if (!internalGetTargetColumnCorrelations().equals(other.internalGetTargetColumnCorrelations())) - return false; - if (hasStatsUpdateTime() != other.hasStatsUpdateTime()) return false; - if (hasStatsUpdateTime()) { - if (!getStatsUpdateTime().equals(other.getStatsUpdateTime())) return false; - } - if (!unknownFields.equals(other.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) + PRIMARY_TABLE_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getPrimaryTableSpecId().hashCode(); - hash = (37 * hash) + TARGET_COLUMN_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getTargetColumnSpecId().hashCode(); - hash = (37 * hash) + WEIGHT_COLUMN_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getWeightColumnSpecId().hashCode(); - hash = (37 * hash) + ML_USE_COLUMN_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getMlUseColumnSpecId().hashCode(); - if (!internalGetTargetColumnCorrelations().getMap().isEmpty()) { - hash = (37 * hash) + TARGET_COLUMN_CORRELATIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetTargetColumnCorrelations().hashCode(); - } - if (hasStatsUpdateTime()) { - hash = (37 * hash) + STATS_UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getStatsUpdateTime().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TablesDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Metadata for a dataset used for AutoML Tables.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TablesDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TablesDatasetMetadata) - com.google.cloud.automl.v1beta1.TablesDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 6: - return internalGetTargetColumnCorrelations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 6: - return internalGetMutableTargetColumnCorrelations(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TablesDatasetMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TablesDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - primaryTableSpecId_ = ""; - - targetColumnSpecId_ = ""; - - weightColumnSpecId_ = ""; - - mlUseColumnSpecId_ = ""; - - internalGetMutableTargetColumnCorrelations().clear(); - if (statsUpdateTimeBuilder_ == null) { - statsUpdateTime_ = null; - } else { - statsUpdateTime_ = null; - statsUpdateTimeBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesDatasetMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesDatasetMetadata build() { - com.google.cloud.automl.v1beta1.TablesDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TablesDatasetMetadata result = - new com.google.cloud.automl.v1beta1.TablesDatasetMetadata(this); - int from_bitField0_ = bitField0_; - result.primaryTableSpecId_ = primaryTableSpecId_; - result.targetColumnSpecId_ = targetColumnSpecId_; - result.weightColumnSpecId_ = weightColumnSpecId_; - result.mlUseColumnSpecId_ = mlUseColumnSpecId_; - result.targetColumnCorrelations_ = internalGetTargetColumnCorrelations(); - result.targetColumnCorrelations_.makeImmutable(); - if (statsUpdateTimeBuilder_ == null) { - result.statsUpdateTime_ = statsUpdateTime_; - } else { - result.statsUpdateTime_ = statsUpdateTimeBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TablesDatasetMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TablesDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TablesDatasetMetadata other) { - if (other == com.google.cloud.automl.v1beta1.TablesDatasetMetadata.getDefaultInstance()) - return this; - if (!other.getPrimaryTableSpecId().isEmpty()) { - primaryTableSpecId_ = other.primaryTableSpecId_; - onChanged(); - } - if (!other.getTargetColumnSpecId().isEmpty()) { - targetColumnSpecId_ = other.targetColumnSpecId_; - onChanged(); - } - if (!other.getWeightColumnSpecId().isEmpty()) { - weightColumnSpecId_ = other.weightColumnSpecId_; - onChanged(); - } - if (!other.getMlUseColumnSpecId().isEmpty()) { - mlUseColumnSpecId_ = other.mlUseColumnSpecId_; - onChanged(); - } - internalGetMutableTargetColumnCorrelations() - .mergeFrom(other.internalGetTargetColumnCorrelations()); - if (other.hasStatsUpdateTime()) { - mergeStatsUpdateTime(other.getStatsUpdateTime()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TablesDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TablesDatasetMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.lang.Object primaryTableSpecId_ = ""; - /** - * - * - *
-     * Output only. The table_spec_id of the primary table of this dataset.
-     * 
- * - * string primary_table_spec_id = 1; - * - * @return The primaryTableSpecId. - */ - public java.lang.String getPrimaryTableSpecId() { - java.lang.Object ref = primaryTableSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - primaryTableSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The table_spec_id of the primary table of this dataset.
-     * 
- * - * string primary_table_spec_id = 1; - * - * @return The bytes for primaryTableSpecId. - */ - public com.google.protobuf.ByteString getPrimaryTableSpecIdBytes() { - java.lang.Object ref = primaryTableSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - primaryTableSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The table_spec_id of the primary table of this dataset.
-     * 
- * - * string primary_table_spec_id = 1; - * - * @param value The primaryTableSpecId to set. - * @return This builder for chaining. - */ - public Builder setPrimaryTableSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - primaryTableSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The table_spec_id of the primary table of this dataset.
-     * 
- * - * string primary_table_spec_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearPrimaryTableSpecId() { - - primaryTableSpecId_ = getDefaultInstance().getPrimaryTableSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The table_spec_id of the primary table of this dataset.
-     * 
- * - * string primary_table_spec_id = 1; - * - * @param value The bytes for primaryTableSpecId to set. - * @return This builder for chaining. - */ - public Builder setPrimaryTableSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - primaryTableSpecId_ = value; - onChanged(); - return this; - } - - private java.lang.Object targetColumnSpecId_ = ""; - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * training & prediction target.
-     * This column must be non-nullable and have one of following data types
-     * (otherwise model creation will error):
-     * * CATEGORY
-     * * FLOAT64
-     * If the type is CATEGORY , only up to
-     * 100 unique values may exist in that column across all rows.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string target_column_spec_id = 2; - * - * @return The targetColumnSpecId. - */ - public java.lang.String getTargetColumnSpecId() { - java.lang.Object ref = targetColumnSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetColumnSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * training & prediction target.
-     * This column must be non-nullable and have one of following data types
-     * (otherwise model creation will error):
-     * * CATEGORY
-     * * FLOAT64
-     * If the type is CATEGORY , only up to
-     * 100 unique values may exist in that column across all rows.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string target_column_spec_id = 2; - * - * @return The bytes for targetColumnSpecId. - */ - public com.google.protobuf.ByteString getTargetColumnSpecIdBytes() { - java.lang.Object ref = targetColumnSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * training & prediction target.
-     * This column must be non-nullable and have one of following data types
-     * (otherwise model creation will error):
-     * * CATEGORY
-     * * FLOAT64
-     * If the type is CATEGORY , only up to
-     * 100 unique values may exist in that column across all rows.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string target_column_spec_id = 2; - * - * @param value The targetColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setTargetColumnSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetColumnSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * training & prediction target.
-     * This column must be non-nullable and have one of following data types
-     * (otherwise model creation will error):
-     * * CATEGORY
-     * * FLOAT64
-     * If the type is CATEGORY , only up to
-     * 100 unique values may exist in that column across all rows.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string target_column_spec_id = 2; - * - * @return This builder for chaining. - */ - public Builder clearTargetColumnSpecId() { - - targetColumnSpecId_ = getDefaultInstance().getTargetColumnSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * training & prediction target.
-     * This column must be non-nullable and have one of following data types
-     * (otherwise model creation will error):
-     * * CATEGORY
-     * * FLOAT64
-     * If the type is CATEGORY , only up to
-     * 100 unique values may exist in that column across all rows.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string target_column_spec_id = 2; - * - * @param value The bytes for targetColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setTargetColumnSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetColumnSpecId_ = value; - onChanged(); - return this; - } - - private java.lang.Object weightColumnSpecId_ = ""; - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * weight column, i.e. the higher the value the more important the row will be
-     * during model training.
-     * Required type: FLOAT64.
-     * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-     *                 ignored for training.
-     * If not set all rows are assumed to have equal weight of 1.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string weight_column_spec_id = 3; - * - * @return The weightColumnSpecId. - */ - public java.lang.String getWeightColumnSpecId() { - java.lang.Object ref = weightColumnSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - weightColumnSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * weight column, i.e. the higher the value the more important the row will be
-     * during model training.
-     * Required type: FLOAT64.
-     * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-     *                 ignored for training.
-     * If not set all rows are assumed to have equal weight of 1.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string weight_column_spec_id = 3; - * - * @return The bytes for weightColumnSpecId. - */ - public com.google.protobuf.ByteString getWeightColumnSpecIdBytes() { - java.lang.Object ref = weightColumnSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - weightColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * weight column, i.e. the higher the value the more important the row will be
-     * during model training.
-     * Required type: FLOAT64.
-     * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-     *                 ignored for training.
-     * If not set all rows are assumed to have equal weight of 1.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string weight_column_spec_id = 3; - * - * @param value The weightColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setWeightColumnSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - weightColumnSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * weight column, i.e. the higher the value the more important the row will be
-     * during model training.
-     * Required type: FLOAT64.
-     * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-     *                 ignored for training.
-     * If not set all rows are assumed to have equal weight of 1.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string weight_column_spec_id = 3; - * - * @return This builder for chaining. - */ - public Builder clearWeightColumnSpecId() { - - weightColumnSpecId_ = getDefaultInstance().getWeightColumnSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the primary table's column that should be used as the
-     * weight column, i.e. the higher the value the more important the row will be
-     * during model training.
-     * Required type: FLOAT64.
-     * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-     *                 ignored for training.
-     * If not set all rows are assumed to have equal weight of 1.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string weight_column_spec_id = 3; - * - * @param value The bytes for weightColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setWeightColumnSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - weightColumnSpecId_ = value; - onChanged(); - return this; - } - - private java.lang.Object mlUseColumnSpecId_ = ""; - /** - * - * - *
-     * column_spec_id of the primary table column which specifies a possible ML
-     * use of the row, i.e. the column will be used to split the rows into TRAIN,
-     * VALIDATE and TEST sets.
-     * Required type: STRING.
-     * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-     * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-     * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-     * that if a given ml use distribution makes it impossible to create a "good"
-     * model, that call will error describing the issue.
-     * If both this column_spec_id and primary table's time_column_spec_id are not
-     * set, then all rows are treated as `UNASSIGNED`.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string ml_use_column_spec_id = 4; - * - * @return The mlUseColumnSpecId. - */ - public java.lang.String getMlUseColumnSpecId() { - java.lang.Object ref = mlUseColumnSpecId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mlUseColumnSpecId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * column_spec_id of the primary table column which specifies a possible ML
-     * use of the row, i.e. the column will be used to split the rows into TRAIN,
-     * VALIDATE and TEST sets.
-     * Required type: STRING.
-     * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-     * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-     * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-     * that if a given ml use distribution makes it impossible to create a "good"
-     * model, that call will error describing the issue.
-     * If both this column_spec_id and primary table's time_column_spec_id are not
-     * set, then all rows are treated as `UNASSIGNED`.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string ml_use_column_spec_id = 4; - * - * @return The bytes for mlUseColumnSpecId. - */ - public com.google.protobuf.ByteString getMlUseColumnSpecIdBytes() { - java.lang.Object ref = mlUseColumnSpecId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mlUseColumnSpecId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * column_spec_id of the primary table column which specifies a possible ML
-     * use of the row, i.e. the column will be used to split the rows into TRAIN,
-     * VALIDATE and TEST sets.
-     * Required type: STRING.
-     * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-     * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-     * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-     * that if a given ml use distribution makes it impossible to create a "good"
-     * model, that call will error describing the issue.
-     * If both this column_spec_id and primary table's time_column_spec_id are not
-     * set, then all rows are treated as `UNASSIGNED`.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string ml_use_column_spec_id = 4; - * - * @param value The mlUseColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setMlUseColumnSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - mlUseColumnSpecId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the primary table column which specifies a possible ML
-     * use of the row, i.e. the column will be used to split the rows into TRAIN,
-     * VALIDATE and TEST sets.
-     * Required type: STRING.
-     * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-     * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-     * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-     * that if a given ml use distribution makes it impossible to create a "good"
-     * model, that call will error describing the issue.
-     * If both this column_spec_id and primary table's time_column_spec_id are not
-     * set, then all rows are treated as `UNASSIGNED`.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string ml_use_column_spec_id = 4; - * - * @return This builder for chaining. - */ - public Builder clearMlUseColumnSpecId() { - - mlUseColumnSpecId_ = getDefaultInstance().getMlUseColumnSpecId(); - onChanged(); - return this; - } - /** - * - * - *
-     * column_spec_id of the primary table column which specifies a possible ML
-     * use of the row, i.e. the column will be used to split the rows into TRAIN,
-     * VALIDATE and TEST sets.
-     * Required type: STRING.
-     * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-     * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-     * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-     * that if a given ml use distribution makes it impossible to create a "good"
-     * model, that call will error describing the issue.
-     * If both this column_spec_id and primary table's time_column_spec_id are not
-     * set, then all rows are treated as `UNASSIGNED`.
-     * NOTE: Updates of this field will instantly affect any other users
-     * concurrently working with the dataset.
-     * 
- * - * string ml_use_column_spec_id = 4; - * - * @param value The bytes for mlUseColumnSpecId to set. - * @return This builder for chaining. - */ - public Builder setMlUseColumnSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - mlUseColumnSpecId_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - targetColumnCorrelations_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - internalGetTargetColumnCorrelations() { - if (targetColumnCorrelations_ == null) { - return com.google.protobuf.MapField.emptyMapField( - TargetColumnCorrelationsDefaultEntryHolder.defaultEntry); - } - return targetColumnCorrelations_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.CorrelationStats> - internalGetMutableTargetColumnCorrelations() { - onChanged(); - ; - if (targetColumnCorrelations_ == null) { - targetColumnCorrelations_ = - com.google.protobuf.MapField.newMapField( - TargetColumnCorrelationsDefaultEntryHolder.defaultEntry); - } - if (!targetColumnCorrelations_.isMutable()) { - targetColumnCorrelations_ = targetColumnCorrelations_.copy(); - } - return targetColumnCorrelations_; - } - - public int getTargetColumnCorrelationsCount() { - return internalGetTargetColumnCorrelations().getMap().size(); - } - /** - * - * - *
-     * Output only. Correlations between
-     * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-     * and other columns of the
-     * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-     * Only set if the target column is set. Mapping from other column spec id to
-     * its CorrelationStats with the target column.
-     * This field may be stale, see the stats_update_time field for
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public boolean containsTargetColumnCorrelations(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetTargetColumnCorrelations().getMap().containsKey(key); - } - /** Use {@link #getTargetColumnCorrelationsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map - getTargetColumnCorrelations() { - return getTargetColumnCorrelationsMap(); - } - /** - * - * - *
-     * Output only. Correlations between
-     * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-     * and other columns of the
-     * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-     * Only set if the target column is set. Mapping from other column spec id to
-     * its CorrelationStats with the target column.
-     * This field may be stale, see the stats_update_time field for
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public java.util.Map - getTargetColumnCorrelationsMap() { - return internalGetTargetColumnCorrelations().getMap(); - } - /** - * - * - *
-     * Output only. Correlations between
-     * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-     * and other columns of the
-     * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-     * Only set if the target column is set. Mapping from other column spec id to
-     * its CorrelationStats with the target column.
-     * This field may be stale, see the stats_update_time field for
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public com.google.cloud.automl.v1beta1.CorrelationStats getTargetColumnCorrelationsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.CorrelationStats defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetTargetColumnCorrelations().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Output only. Correlations between
-     * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-     * and other columns of the
-     * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-     * Only set if the target column is set. Mapping from other column spec id to
-     * its CorrelationStats with the target column.
-     * This field may be stale, see the stats_update_time field for
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public com.google.cloud.automl.v1beta1.CorrelationStats getTargetColumnCorrelationsOrThrow( - java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = - internalGetTargetColumnCorrelations().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearTargetColumnCorrelations() { - internalGetMutableTargetColumnCorrelations().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Output only. Correlations between
-     * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-     * and other columns of the
-     * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-     * Only set if the target column is set. Mapping from other column spec id to
-     * its CorrelationStats with the target column.
-     * This field may be stale, see the stats_update_time field for
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public Builder removeTargetColumnCorrelations(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableTargetColumnCorrelations().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map - getMutableTargetColumnCorrelations() { - return internalGetMutableTargetColumnCorrelations().getMutableMap(); - } - /** - * - * - *
-     * Output only. Correlations between
-     * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-     * and other columns of the
-     * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-     * Only set if the target column is set. Mapping from other column spec id to
-     * its CorrelationStats with the target column.
-     * This field may be stale, see the stats_update_time field for
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public Builder putTargetColumnCorrelations( - java.lang.String key, com.google.cloud.automl.v1beta1.CorrelationStats value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableTargetColumnCorrelations().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Output only. Correlations between
-     * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-     * and other columns of the
-     * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-     * Only set if the target column is set. Mapping from other column spec id to
-     * its CorrelationStats with the target column.
-     * This field may be stale, see the stats_update_time field for
-     * for the timestamp at which these stats were last updated.
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - public Builder putAllTargetColumnCorrelations( - java.util.Map values) { - internalGetMutableTargetColumnCorrelations().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.Timestamp statsUpdateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - statsUpdateTimeBuilder_; - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - * - * @return Whether the statsUpdateTime field is set. - */ - public boolean hasStatsUpdateTime() { - return statsUpdateTimeBuilder_ != null || statsUpdateTime_ != null; - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - * - * @return The statsUpdateTime. - */ - public com.google.protobuf.Timestamp getStatsUpdateTime() { - if (statsUpdateTimeBuilder_ == null) { - return statsUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : statsUpdateTime_; - } else { - return statsUpdateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - public Builder setStatsUpdateTime(com.google.protobuf.Timestamp value) { - if (statsUpdateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - statsUpdateTime_ = value; - onChanged(); - } else { - statsUpdateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - public Builder setStatsUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (statsUpdateTimeBuilder_ == null) { - statsUpdateTime_ = builderForValue.build(); - onChanged(); - } else { - statsUpdateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - public Builder mergeStatsUpdateTime(com.google.protobuf.Timestamp value) { - if (statsUpdateTimeBuilder_ == null) { - if (statsUpdateTime_ != null) { - statsUpdateTime_ = - com.google.protobuf.Timestamp.newBuilder(statsUpdateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - statsUpdateTime_ = value; - } - onChanged(); - } else { - statsUpdateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - public Builder clearStatsUpdateTime() { - if (statsUpdateTimeBuilder_ == null) { - statsUpdateTime_ = null; - onChanged(); - } else { - statsUpdateTime_ = null; - statsUpdateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - public com.google.protobuf.Timestamp.Builder getStatsUpdateTimeBuilder() { - - onChanged(); - return getStatsUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - public com.google.protobuf.TimestampOrBuilder getStatsUpdateTimeOrBuilder() { - if (statsUpdateTimeBuilder_ != null) { - return statsUpdateTimeBuilder_.getMessageOrBuilder(); - } else { - return statsUpdateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : statsUpdateTime_; - } - } - /** - * - * - *
-     * Output only. The most recent timestamp when target_column_correlations
-     * field and all descendant ColumnSpec.data_stats and
-     * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-     * changes that happened to the dataset afterwards are not reflected in these
-     * fields values. The regeneration happens in the background on a best effort
-     * basis.
-     * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getStatsUpdateTimeFieldBuilder() { - if (statsUpdateTimeBuilder_ == null) { - statsUpdateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getStatsUpdateTime(), getParentForChildren(), isClean()); - statsUpdateTime_ = null; - } - return statsUpdateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TablesDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TablesDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.TablesDatasetMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TablesDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TablesDatasetMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TablesDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TablesDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesDatasetMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadataOrBuilder.java deleted file mode 100644 index 8de254bf8..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,336 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -public interface TablesDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TablesDatasetMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The table_spec_id of the primary table of this dataset.
-   * 
- * - * string primary_table_spec_id = 1; - * - * @return The primaryTableSpecId. - */ - java.lang.String getPrimaryTableSpecId(); - /** - * - * - *
-   * Output only. The table_spec_id of the primary table of this dataset.
-   * 
- * - * string primary_table_spec_id = 1; - * - * @return The bytes for primaryTableSpecId. - */ - com.google.protobuf.ByteString getPrimaryTableSpecIdBytes(); - - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * training & prediction target.
-   * This column must be non-nullable and have one of following data types
-   * (otherwise model creation will error):
-   * * CATEGORY
-   * * FLOAT64
-   * If the type is CATEGORY , only up to
-   * 100 unique values may exist in that column across all rows.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string target_column_spec_id = 2; - * - * @return The targetColumnSpecId. - */ - java.lang.String getTargetColumnSpecId(); - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * training & prediction target.
-   * This column must be non-nullable and have one of following data types
-   * (otherwise model creation will error):
-   * * CATEGORY
-   * * FLOAT64
-   * If the type is CATEGORY , only up to
-   * 100 unique values may exist in that column across all rows.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string target_column_spec_id = 2; - * - * @return The bytes for targetColumnSpecId. - */ - com.google.protobuf.ByteString getTargetColumnSpecIdBytes(); - - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * weight column, i.e. the higher the value the more important the row will be
-   * during model training.
-   * Required type: FLOAT64.
-   * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-   *                 ignored for training.
-   * If not set all rows are assumed to have equal weight of 1.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string weight_column_spec_id = 3; - * - * @return The weightColumnSpecId. - */ - java.lang.String getWeightColumnSpecId(); - /** - * - * - *
-   * column_spec_id of the primary table's column that should be used as the
-   * weight column, i.e. the higher the value the more important the row will be
-   * during model training.
-   * Required type: FLOAT64.
-   * Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is
-   *                 ignored for training.
-   * If not set all rows are assumed to have equal weight of 1.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string weight_column_spec_id = 3; - * - * @return The bytes for weightColumnSpecId. - */ - com.google.protobuf.ByteString getWeightColumnSpecIdBytes(); - - /** - * - * - *
-   * column_spec_id of the primary table column which specifies a possible ML
-   * use of the row, i.e. the column will be used to split the rows into TRAIN,
-   * VALIDATE and TEST sets.
-   * Required type: STRING.
-   * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-   * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-   * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-   * that if a given ml use distribution makes it impossible to create a "good"
-   * model, that call will error describing the issue.
-   * If both this column_spec_id and primary table's time_column_spec_id are not
-   * set, then all rows are treated as `UNASSIGNED`.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string ml_use_column_spec_id = 4; - * - * @return The mlUseColumnSpecId. - */ - java.lang.String getMlUseColumnSpecId(); - /** - * - * - *
-   * column_spec_id of the primary table column which specifies a possible ML
-   * use of the row, i.e. the column will be used to split the rows into TRAIN,
-   * VALIDATE and TEST sets.
-   * Required type: STRING.
-   * This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST`
-   * among its values, or only have `TEST`, `UNASSIGNED` values. In the latter
-   * case the rows with `UNASSIGNED` value will be assigned by AutoML. Note
-   * that if a given ml use distribution makes it impossible to create a "good"
-   * model, that call will error describing the issue.
-   * If both this column_spec_id and primary table's time_column_spec_id are not
-   * set, then all rows are treated as `UNASSIGNED`.
-   * NOTE: Updates of this field will instantly affect any other users
-   * concurrently working with the dataset.
-   * 
- * - * string ml_use_column_spec_id = 4; - * - * @return The bytes for mlUseColumnSpecId. - */ - com.google.protobuf.ByteString getMlUseColumnSpecIdBytes(); - - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - int getTargetColumnCorrelationsCount(); - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - boolean containsTargetColumnCorrelations(java.lang.String key); - /** Use {@link #getTargetColumnCorrelationsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getTargetColumnCorrelations(); - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - java.util.Map - getTargetColumnCorrelationsMap(); - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - com.google.cloud.automl.v1beta1.CorrelationStats getTargetColumnCorrelationsOrDefault( - java.lang.String key, com.google.cloud.automl.v1beta1.CorrelationStats defaultValue); - /** - * - * - *
-   * Output only. Correlations between
-   * [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id],
-   * and other columns of the
-   * [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id].
-   * Only set if the target column is set. Mapping from other column spec id to
-   * its CorrelationStats with the target column.
-   * This field may be stale, see the stats_update_time field for
-   * for the timestamp at which these stats were last updated.
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.CorrelationStats> target_column_correlations = 6; - * - */ - com.google.cloud.automl.v1beta1.CorrelationStats getTargetColumnCorrelationsOrThrow( - java.lang.String key); - - /** - * - * - *
-   * Output only. The most recent timestamp when target_column_correlations
-   * field and all descendant ColumnSpec.data_stats and
-   * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-   * changes that happened to the dataset afterwards are not reflected in these
-   * fields values. The regeneration happens in the background on a best effort
-   * basis.
-   * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - * - * @return Whether the statsUpdateTime field is set. - */ - boolean hasStatsUpdateTime(); - /** - * - * - *
-   * Output only. The most recent timestamp when target_column_correlations
-   * field and all descendant ColumnSpec.data_stats and
-   * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-   * changes that happened to the dataset afterwards are not reflected in these
-   * fields values. The regeneration happens in the background on a best effort
-   * basis.
-   * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - * - * @return The statsUpdateTime. - */ - com.google.protobuf.Timestamp getStatsUpdateTime(); - /** - * - * - *
-   * Output only. The most recent timestamp when target_column_correlations
-   * field and all descendant ColumnSpec.data_stats and
-   * ColumnSpec.top_correlated_columns fields were last (re-)generated. Any
-   * changes that happened to the dataset afterwards are not reflected in these
-   * fields values. The regeneration happens in the background on a best effort
-   * basis.
-   * 
- * - * .google.protobuf.Timestamp stats_update_time = 7; - */ - com.google.protobuf.TimestampOrBuilder getStatsUpdateTimeOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfo.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfo.java deleted file mode 100644 index 930d8a971..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfo.java +++ /dev/null @@ -1,977 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * An information specific to given column and Tables Model, in context
- * of the Model and the predictions created by it.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TablesModelColumnInfo} - */ -public final class TablesModelColumnInfo extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TablesModelColumnInfo) - TablesModelColumnInfoOrBuilder { - private static final long serialVersionUID = 0L; - // Use TablesModelColumnInfo.newBuilder() to construct. - private TablesModelColumnInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TablesModelColumnInfo() { - columnSpecName_ = ""; - columnDisplayName_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TablesModelColumnInfo(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TablesModelColumnInfo( - 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(); - - columnSpecName_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - columnDisplayName_ = s; - break; - } - case 29: - { - featureImportance_ = 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.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.class, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder.class); - } - - public static final int COLUMN_SPEC_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object columnSpecName_; - /** - * - * - *
-   * Output only. The name of the ColumnSpec describing the column. Not
-   * populated when this proto is outputted to BigQuery.
-   * 
- * - * string column_spec_name = 1; - * - * @return The columnSpecName. - */ - public java.lang.String getColumnSpecName() { - java.lang.Object ref = columnSpecName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - columnSpecName_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The name of the ColumnSpec describing the column. Not
-   * populated when this proto is outputted to BigQuery.
-   * 
- * - * string column_spec_name = 1; - * - * @return The bytes for columnSpecName. - */ - public com.google.protobuf.ByteString getColumnSpecNameBytes() { - java.lang.Object ref = columnSpecName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - columnSpecName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int COLUMN_DISPLAY_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object columnDisplayName_; - /** - * - * - *
-   * Output only. The display name of the column (same as the display_name of
-   * its ColumnSpec).
-   * 
- * - * string column_display_name = 2; - * - * @return The columnDisplayName. - */ - public java.lang.String getColumnDisplayName() { - java.lang.Object ref = columnDisplayName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - columnDisplayName_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The display name of the column (same as the display_name of
-   * its ColumnSpec).
-   * 
- * - * string column_display_name = 2; - * - * @return The bytes for columnDisplayName. - */ - public com.google.protobuf.ByteString getColumnDisplayNameBytes() { - java.lang.Object ref = columnDisplayName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - columnDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FEATURE_IMPORTANCE_FIELD_NUMBER = 3; - private float featureImportance_; - /** - * - * - *
-   * Output only. When given as part of a Model (always populated):
-   * Measurement of how much model predictions correctness on the TEST data
-   * depend on values in this column. A value between 0 and 1, higher means
-   * higher influence. These values are normalized - for all input feature
-   * columns of a given model they add to 1.
-   * When given back by Predict (populated iff
-   * [feature_importance
-   * param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch
-   * Predict (populated iff
-   * [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params]
-   * param is set):
-   * Measurement of how impactful for the prediction returned for the given row
-   * the value in this column was. Specifically, the feature importance
-   * specifies the marginal contribution that the feature made to the prediction
-   * score compared to the baseline score. These values are computed using the
-   * Sampled Shapley method.
-   * 
- * - * float feature_importance = 3; - * - * @return The featureImportance. - */ - public float getFeatureImportance() { - return featureImportance_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getColumnSpecNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnSpecName_); - } - if (!getColumnDisplayNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, columnDisplayName_); - } - if (featureImportance_ != 0F) { - output.writeFloat(3, featureImportance_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getColumnSpecNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnSpecName_); - } - if (!getColumnDisplayNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, columnDisplayName_); - } - if (featureImportance_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, featureImportance_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TablesModelColumnInfo)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TablesModelColumnInfo other = - (com.google.cloud.automl.v1beta1.TablesModelColumnInfo) obj; - - if (!getColumnSpecName().equals(other.getColumnSpecName())) return false; - if (!getColumnDisplayName().equals(other.getColumnDisplayName())) return false; - if (java.lang.Float.floatToIntBits(getFeatureImportance()) - != java.lang.Float.floatToIntBits(other.getFeatureImportance())) return false; - if (!unknownFields.equals(other.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_SPEC_NAME_FIELD_NUMBER; - hash = (53 * hash) + getColumnSpecName().hashCode(); - hash = (37 * hash) + COLUMN_DISPLAY_NAME_FIELD_NUMBER; - hash = (53 * hash) + getColumnDisplayName().hashCode(); - hash = (37 * hash) + FEATURE_IMPORTANCE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getFeatureImportance()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * An information specific to given column and Tables Model, in context
-   * of the Model and the predictions created by it.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TablesModelColumnInfo} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TablesModelColumnInfo) - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.class, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TablesModelColumnInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - columnSpecName_ = ""; - - columnDisplayName_ = ""; - - featureImportance_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelColumnInfo_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TablesModelColumnInfo.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo build() { - com.google.cloud.automl.v1beta1.TablesModelColumnInfo result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo buildPartial() { - com.google.cloud.automl.v1beta1.TablesModelColumnInfo result = - new com.google.cloud.automl.v1beta1.TablesModelColumnInfo(this); - result.columnSpecName_ = columnSpecName_; - result.columnDisplayName_ = columnDisplayName_; - result.featureImportance_ = featureImportance_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TablesModelColumnInfo) { - return mergeFrom((com.google.cloud.automl.v1beta1.TablesModelColumnInfo) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TablesModelColumnInfo other) { - if (other == com.google.cloud.automl.v1beta1.TablesModelColumnInfo.getDefaultInstance()) - return this; - if (!other.getColumnSpecName().isEmpty()) { - columnSpecName_ = other.columnSpecName_; - onChanged(); - } - if (!other.getColumnDisplayName().isEmpty()) { - columnDisplayName_ = other.columnDisplayName_; - onChanged(); - } - if (other.getFeatureImportance() != 0F) { - setFeatureImportance(other.getFeatureImportance()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TablesModelColumnInfo parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TablesModelColumnInfo) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object columnSpecName_ = ""; - /** - * - * - *
-     * Output only. The name of the ColumnSpec describing the column. Not
-     * populated when this proto is outputted to BigQuery.
-     * 
- * - * string column_spec_name = 1; - * - * @return The columnSpecName. - */ - public java.lang.String getColumnSpecName() { - java.lang.Object ref = columnSpecName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - columnSpecName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The name of the ColumnSpec describing the column. Not
-     * populated when this proto is outputted to BigQuery.
-     * 
- * - * string column_spec_name = 1; - * - * @return The bytes for columnSpecName. - */ - public com.google.protobuf.ByteString getColumnSpecNameBytes() { - java.lang.Object ref = columnSpecName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - columnSpecName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The name of the ColumnSpec describing the column. Not
-     * populated when this proto is outputted to BigQuery.
-     * 
- * - * string column_spec_name = 1; - * - * @param value The columnSpecName to set. - * @return This builder for chaining. - */ - public Builder setColumnSpecName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - columnSpecName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the ColumnSpec describing the column. Not
-     * populated when this proto is outputted to BigQuery.
-     * 
- * - * string column_spec_name = 1; - * - * @return This builder for chaining. - */ - public Builder clearColumnSpecName() { - - columnSpecName_ = getDefaultInstance().getColumnSpecName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The name of the ColumnSpec describing the column. Not
-     * populated when this proto is outputted to BigQuery.
-     * 
- * - * string column_spec_name = 1; - * - * @param value The bytes for columnSpecName to set. - * @return This builder for chaining. - */ - public Builder setColumnSpecNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - columnSpecName_ = value; - onChanged(); - return this; - } - - private java.lang.Object columnDisplayName_ = ""; - /** - * - * - *
-     * Output only. The display name of the column (same as the display_name of
-     * its ColumnSpec).
-     * 
- * - * string column_display_name = 2; - * - * @return The columnDisplayName. - */ - public java.lang.String getColumnDisplayName() { - java.lang.Object ref = columnDisplayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - columnDisplayName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The display name of the column (same as the display_name of
-     * its ColumnSpec).
-     * 
- * - * string column_display_name = 2; - * - * @return The bytes for columnDisplayName. - */ - public com.google.protobuf.ByteString getColumnDisplayNameBytes() { - java.lang.Object ref = columnDisplayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - columnDisplayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The display name of the column (same as the display_name of
-     * its ColumnSpec).
-     * 
- * - * string column_display_name = 2; - * - * @param value The columnDisplayName to set. - * @return This builder for chaining. - */ - public Builder setColumnDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - columnDisplayName_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The display name of the column (same as the display_name of
-     * its ColumnSpec).
-     * 
- * - * string column_display_name = 2; - * - * @return This builder for chaining. - */ - public Builder clearColumnDisplayName() { - - columnDisplayName_ = getDefaultInstance().getColumnDisplayName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The display name of the column (same as the display_name of
-     * its ColumnSpec).
-     * 
- * - * string column_display_name = 2; - * - * @param value The bytes for columnDisplayName to set. - * @return This builder for chaining. - */ - public Builder setColumnDisplayNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - columnDisplayName_ = value; - onChanged(); - return this; - } - - private float featureImportance_; - /** - * - * - *
-     * Output only. When given as part of a Model (always populated):
-     * Measurement of how much model predictions correctness on the TEST data
-     * depend on values in this column. A value between 0 and 1, higher means
-     * higher influence. These values are normalized - for all input feature
-     * columns of a given model they add to 1.
-     * When given back by Predict (populated iff
-     * [feature_importance
-     * param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch
-     * Predict (populated iff
-     * [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params]
-     * param is set):
-     * Measurement of how impactful for the prediction returned for the given row
-     * the value in this column was. Specifically, the feature importance
-     * specifies the marginal contribution that the feature made to the prediction
-     * score compared to the baseline score. These values are computed using the
-     * Sampled Shapley method.
-     * 
- * - * float feature_importance = 3; - * - * @return The featureImportance. - */ - public float getFeatureImportance() { - return featureImportance_; - } - /** - * - * - *
-     * Output only. When given as part of a Model (always populated):
-     * Measurement of how much model predictions correctness on the TEST data
-     * depend on values in this column. A value between 0 and 1, higher means
-     * higher influence. These values are normalized - for all input feature
-     * columns of a given model they add to 1.
-     * When given back by Predict (populated iff
-     * [feature_importance
-     * param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch
-     * Predict (populated iff
-     * [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params]
-     * param is set):
-     * Measurement of how impactful for the prediction returned for the given row
-     * the value in this column was. Specifically, the feature importance
-     * specifies the marginal contribution that the feature made to the prediction
-     * score compared to the baseline score. These values are computed using the
-     * Sampled Shapley method.
-     * 
- * - * float feature_importance = 3; - * - * @param value The featureImportance to set. - * @return This builder for chaining. - */ - public Builder setFeatureImportance(float value) { - - featureImportance_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. When given as part of a Model (always populated):
-     * Measurement of how much model predictions correctness on the TEST data
-     * depend on values in this column. A value between 0 and 1, higher means
-     * higher influence. These values are normalized - for all input feature
-     * columns of a given model they add to 1.
-     * When given back by Predict (populated iff
-     * [feature_importance
-     * param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch
-     * Predict (populated iff
-     * [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params]
-     * param is set):
-     * Measurement of how impactful for the prediction returned for the given row
-     * the value in this column was. Specifically, the feature importance
-     * specifies the marginal contribution that the feature made to the prediction
-     * score compared to the baseline score. These values are computed using the
-     * Sampled Shapley method.
-     * 
- * - * float feature_importance = 3; - * - * @return This builder for chaining. - */ - public Builder clearFeatureImportance() { - - featureImportance_ = 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.automl.v1beta1.TablesModelColumnInfo) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TablesModelColumnInfo) - private static final com.google.cloud.automl.v1beta1.TablesModelColumnInfo DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TablesModelColumnInfo(); - } - - public static com.google.cloud.automl.v1beta1.TablesModelColumnInfo getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TablesModelColumnInfo parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TablesModelColumnInfo(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfoOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfoOrBuilder.java deleted file mode 100644 index 4b234297d..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelColumnInfoOrBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -public interface TablesModelColumnInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TablesModelColumnInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The name of the ColumnSpec describing the column. Not
-   * populated when this proto is outputted to BigQuery.
-   * 
- * - * string column_spec_name = 1; - * - * @return The columnSpecName. - */ - java.lang.String getColumnSpecName(); - /** - * - * - *
-   * Output only. The name of the ColumnSpec describing the column. Not
-   * populated when this proto is outputted to BigQuery.
-   * 
- * - * string column_spec_name = 1; - * - * @return The bytes for columnSpecName. - */ - com.google.protobuf.ByteString getColumnSpecNameBytes(); - - /** - * - * - *
-   * Output only. The display name of the column (same as the display_name of
-   * its ColumnSpec).
-   * 
- * - * string column_display_name = 2; - * - * @return The columnDisplayName. - */ - java.lang.String getColumnDisplayName(); - /** - * - * - *
-   * Output only. The display name of the column (same as the display_name of
-   * its ColumnSpec).
-   * 
- * - * string column_display_name = 2; - * - * @return The bytes for columnDisplayName. - */ - com.google.protobuf.ByteString getColumnDisplayNameBytes(); - - /** - * - * - *
-   * Output only. When given as part of a Model (always populated):
-   * Measurement of how much model predictions correctness on the TEST data
-   * depend on values in this column. A value between 0 and 1, higher means
-   * higher influence. These values are normalized - for all input feature
-   * columns of a given model they add to 1.
-   * When given back by Predict (populated iff
-   * [feature_importance
-   * param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch
-   * Predict (populated iff
-   * [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params]
-   * param is set):
-   * Measurement of how impactful for the prediction returned for the given row
-   * the value in this column was. Specifically, the feature importance
-   * specifies the marginal contribution that the feature made to the prediction
-   * score compared to the baseline score. These values are computed using the
-   * Sampled Shapley method.
-   * 
- * - * float feature_importance = 3; - * - * @return The featureImportance. - */ - float getFeatureImportance(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadata.java deleted file mode 100644 index 90d30c7f1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadata.java +++ /dev/null @@ -1,3160 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata specific to AutoML Tables.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TablesModelMetadata} - */ -public final class TablesModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TablesModelMetadata) - TablesModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TablesModelMetadata.newBuilder() to construct. - private TablesModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TablesModelMetadata() { - inputFeatureColumnSpecs_ = java.util.Collections.emptyList(); - optimizationObjective_ = ""; - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TablesModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TablesModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - com.google.cloud.automl.v1beta1.ColumnSpec.Builder subBuilder = null; - if (targetColumnSpec_ != null) { - subBuilder = targetColumnSpec_.toBuilder(); - } - targetColumnSpec_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ColumnSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetColumnSpec_); - targetColumnSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - inputFeatureColumnSpecs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inputFeatureColumnSpecs_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.ColumnSpec.parser(), extensionRegistry)); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - optimizationObjective_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - tablesModelColumnInfo_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo>(); - mutable_bitField0_ |= 0x00000002; - } - tablesModelColumnInfo_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.parser(), - extensionRegistry)); - break; - } - case 48: - { - trainBudgetMilliNodeHours_ = input.readInt64(); - break; - } - case 56: - { - trainCostMilliNodeHours_ = input.readInt64(); - break; - } - case 96: - { - disableEarlyStopping_ = input.readBool(); - break; - } - case 141: - { - additionalOptimizationObjectiveConfigCase_ = 17; - additionalOptimizationObjectiveConfig_ = input.readFloat(); - break; - } - case 149: - { - additionalOptimizationObjectiveConfigCase_ = 18; - additionalOptimizationObjectiveConfig_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inputFeatureColumnSpecs_ = java.util.Collections.unmodifiableList(inputFeatureColumnSpecs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - tablesModelColumnInfo_ = java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesModelMetadata.class, - com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder.class); - } - - 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(17), - OPTIMIZATION_OBJECTIVE_PRECISION_VALUE(18), - 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 17: - return OPTIMIZATION_OBJECTIVE_RECALL_VALUE; - case 18: - 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 = 17; - /** - * - * - *
-   * Required when optimization_objective is "MAXIMIZE_PRECISION_AT_RECALL".
-   * Must be between 0 and 1, inclusive.
-   * 
- * - * float optimization_objective_recall_value = 17; - * - * @return The optimizationObjectiveRecallValue. - */ - public float getOptimizationObjectiveRecallValue() { - if (additionalOptimizationObjectiveConfigCase_ == 17) { - return (java.lang.Float) additionalOptimizationObjectiveConfig_; - } - return 0F; - } - - public static final int OPTIMIZATION_OBJECTIVE_PRECISION_VALUE_FIELD_NUMBER = 18; - /** - * - * - *
-   * Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION".
-   * Must be between 0 and 1, inclusive.
-   * 
- * - * float optimization_objective_precision_value = 18; - * - * @return The optimizationObjectivePrecisionValue. - */ - public float getOptimizationObjectivePrecisionValue() { - if (additionalOptimizationObjectiveConfigCase_ == 18) { - return (java.lang.Float) additionalOptimizationObjectiveConfig_; - } - return 0F; - } - - public static final int TARGET_COLUMN_SPEC_FIELD_NUMBER = 2; - private com.google.cloud.automl.v1beta1.ColumnSpec targetColumnSpec_; - /** - * - * - *
-   * Column spec of the dataset's primary table's column the model is
-   * predicting. Snapshotted when model creation started.
-   * Only 3 fields are used:
-   * name - May be set on CreateModel, if it's not then the ColumnSpec
-   *        corresponding to the current target_column_spec_id of the dataset
-   *        the model is trained from is used.
-   *        If neither is set, CreateModel will error.
-   * display_name - Output only.
-   * data_type - Output only.
-   * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - * - * @return Whether the targetColumnSpec field is set. - */ - public boolean hasTargetColumnSpec() { - return targetColumnSpec_ != null; - } - /** - * - * - *
-   * Column spec of the dataset's primary table's column the model is
-   * predicting. Snapshotted when model creation started.
-   * Only 3 fields are used:
-   * name - May be set on CreateModel, if it's not then the ColumnSpec
-   *        corresponding to the current target_column_spec_id of the dataset
-   *        the model is trained from is used.
-   *        If neither is set, CreateModel will error.
-   * display_name - Output only.
-   * data_type - Output only.
-   * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - * - * @return The targetColumnSpec. - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getTargetColumnSpec() { - return targetColumnSpec_ == null - ? com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance() - : targetColumnSpec_; - } - /** - * - * - *
-   * Column spec of the dataset's primary table's column the model is
-   * predicting. Snapshotted when model creation started.
-   * Only 3 fields are used:
-   * name - May be set on CreateModel, if it's not then the ColumnSpec
-   *        corresponding to the current target_column_spec_id of the dataset
-   *        the model is trained from is used.
-   *        If neither is set, CreateModel will error.
-   * display_name - Output only.
-   * data_type - Output only.
-   * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getTargetColumnSpecOrBuilder() { - return getTargetColumnSpec(); - } - - public static final int INPUT_FEATURE_COLUMN_SPECS_FIELD_NUMBER = 3; - private java.util.List inputFeatureColumnSpecs_; - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public java.util.List - getInputFeatureColumnSpecsList() { - return inputFeatureColumnSpecs_; - } - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public java.util.List - getInputFeatureColumnSpecsOrBuilderList() { - return inputFeatureColumnSpecs_; - } - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public int getInputFeatureColumnSpecsCount() { - return inputFeatureColumnSpecs_.size(); - } - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getInputFeatureColumnSpecs(int index) { - return inputFeatureColumnSpecs_.get(index); - } - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getInputFeatureColumnSpecsOrBuilder( - int index) { - return inputFeatureColumnSpecs_.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. - */ - 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. - */ - 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 TABLES_MODEL_COLUMN_INFO_FIELD_NUMBER = 5; - private java.util.List - tablesModelColumnInfo_; - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public java.util.List - getTablesModelColumnInfoList() { - return tablesModelColumnInfo_; - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public java.util.List - getTablesModelColumnInfoOrBuilderList() { - return tablesModelColumnInfo_; - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public int getTablesModelColumnInfoCount() { - return tablesModelColumnInfo_.size(); - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo getTablesModelColumnInfo(int index) { - return tablesModelColumnInfo_.get(index); - } - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder - getTablesModelColumnInfoOrBuilder(int index) { - return tablesModelColumnInfo_.get(index); - } - - public static final int TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER = 6; - private long trainBudgetMilliNodeHours_; - /** - * - * - *
-   * Required. The train budget of creating this model, expressed in milli node
-   * hours i.e. 1,000 value in this field means 1 node hour.
-   * The training cost of the model will not exceed this budget. The final cost
-   * will be attempted to be close to the budget, though may end up being (even)
-   * noticeably smaller - at the backend's discretion. This especially may
-   * happen when further model training ceases to provide any improvements.
-   * If the budget is set to a value known to be insufficient to train a
-   * model for the given dataset, the training won't be attempted and
-   * will error.
-   * The train budget must be between 1,000 and 72,000 milli node hours,
-   * inclusive.
-   * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return The trainBudgetMilliNodeHours. - */ - public long getTrainBudgetMilliNodeHours() { - return trainBudgetMilliNodeHours_; - } - - public static final int TRAIN_COST_MILLI_NODE_HOURS_FIELD_NUMBER = 7; - 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 = 7; - * - * @return The trainCostMilliNodeHours. - */ - public long getTrainCostMilliNodeHours() { - return trainCostMilliNodeHours_; - } - - public static final int DISABLE_EARLY_STOPPING_FIELD_NUMBER = 12; - 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 = 12; - * - * @return The disableEarlyStopping. - */ - 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 (targetColumnSpec_ != null) { - output.writeMessage(2, getTargetColumnSpec()); - } - for (int i = 0; i < inputFeatureColumnSpecs_.size(); i++) { - output.writeMessage(3, inputFeatureColumnSpecs_.get(i)); - } - if (!getOptimizationObjectiveBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, optimizationObjective_); - } - for (int i = 0; i < tablesModelColumnInfo_.size(); i++) { - output.writeMessage(5, tablesModelColumnInfo_.get(i)); - } - if (trainBudgetMilliNodeHours_ != 0L) { - output.writeInt64(6, trainBudgetMilliNodeHours_); - } - if (trainCostMilliNodeHours_ != 0L) { - output.writeInt64(7, trainCostMilliNodeHours_); - } - if (disableEarlyStopping_ != false) { - output.writeBool(12, disableEarlyStopping_); - } - if (additionalOptimizationObjectiveConfigCase_ == 17) { - output.writeFloat(17, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); - } - if (additionalOptimizationObjectiveConfigCase_ == 18) { - output.writeFloat(18, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (targetColumnSpec_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTargetColumnSpec()); - } - for (int i = 0; i < inputFeatureColumnSpecs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, inputFeatureColumnSpecs_.get(i)); - } - if (!getOptimizationObjectiveBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, optimizationObjective_); - } - for (int i = 0; i < tablesModelColumnInfo_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, tablesModelColumnInfo_.get(i)); - } - if (trainBudgetMilliNodeHours_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, trainBudgetMilliNodeHours_); - } - if (trainCostMilliNodeHours_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, trainCostMilliNodeHours_); - } - if (disableEarlyStopping_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(12, disableEarlyStopping_); - } - if (additionalOptimizationObjectiveConfigCase_ == 17) { - size += - com.google.protobuf.CodedOutputStream.computeFloatSize( - 17, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); - } - if (additionalOptimizationObjectiveConfigCase_ == 18) { - size += - com.google.protobuf.CodedOutputStream.computeFloatSize( - 18, (float) ((java.lang.Float) additionalOptimizationObjectiveConfig_)); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TablesModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TablesModelMetadata other = - (com.google.cloud.automl.v1beta1.TablesModelMetadata) obj; - - if (hasTargetColumnSpec() != other.hasTargetColumnSpec()) return false; - if (hasTargetColumnSpec()) { - if (!getTargetColumnSpec().equals(other.getTargetColumnSpec())) return false; - } - if (!getInputFeatureColumnSpecsList().equals(other.getInputFeatureColumnSpecsList())) - return false; - if (!getOptimizationObjective().equals(other.getOptimizationObjective())) return false; - if (!getTablesModelColumnInfoList().equals(other.getTablesModelColumnInfoList())) return false; - if (getTrainBudgetMilliNodeHours() != other.getTrainBudgetMilliNodeHours()) return false; - if (getTrainCostMilliNodeHours() != other.getTrainCostMilliNodeHours()) return false; - if (getDisableEarlyStopping() != other.getDisableEarlyStopping()) return false; - if (!getAdditionalOptimizationObjectiveConfigCase() - .equals(other.getAdditionalOptimizationObjectiveConfigCase())) return false; - switch (additionalOptimizationObjectiveConfigCase_) { - case 17: - if (java.lang.Float.floatToIntBits(getOptimizationObjectiveRecallValue()) - != java.lang.Float.floatToIntBits(other.getOptimizationObjectiveRecallValue())) - return false; - break; - case 18: - 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(); - if (hasTargetColumnSpec()) { - hash = (37 * hash) + TARGET_COLUMN_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getTargetColumnSpec().hashCode(); - } - if (getInputFeatureColumnSpecsCount() > 0) { - hash = (37 * hash) + INPUT_FEATURE_COLUMN_SPECS_FIELD_NUMBER; - hash = (53 * hash) + getInputFeatureColumnSpecsList().hashCode(); - } - hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_FIELD_NUMBER; - hash = (53 * hash) + getOptimizationObjective().hashCode(); - if (getTablesModelColumnInfoCount() > 0) { - hash = (37 * hash) + TABLES_MODEL_COLUMN_INFO_FIELD_NUMBER; - hash = (53 * hash) + getTablesModelColumnInfoList().hashCode(); - } - hash = (37 * hash) + TRAIN_BUDGET_MILLI_NODE_HOURS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainBudgetMilliNodeHours()); - hash = (37 * hash) + TRAIN_COST_MILLI_NODE_HOURS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTrainCostMilliNodeHours()); - hash = (37 * hash) + DISABLE_EARLY_STOPPING_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDisableEarlyStopping()); - switch (additionalOptimizationObjectiveConfigCase_) { - case 17: - hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_RECALL_VALUE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getOptimizationObjectiveRecallValue()); - break; - case 18: - 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.automl.v1beta1.TablesModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.TablesModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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.automl.v1beta1.TablesModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TablesModelMetadata) - com.google.cloud.automl.v1beta1.TablesModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TablesModelMetadata.class, - com.google.cloud.automl.v1beta1.TablesModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TablesModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getInputFeatureColumnSpecsFieldBuilder(); - getTablesModelColumnInfoFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (targetColumnSpecBuilder_ == null) { - targetColumnSpec_ = null; - } else { - targetColumnSpec_ = null; - targetColumnSpecBuilder_ = null; - } - if (inputFeatureColumnSpecsBuilder_ == null) { - inputFeatureColumnSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - inputFeatureColumnSpecsBuilder_.clear(); - } - optimizationObjective_ = ""; - - if (tablesModelColumnInfoBuilder_ == null) { - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - tablesModelColumnInfoBuilder_.clear(); - } - trainBudgetMilliNodeHours_ = 0L; - - trainCostMilliNodeHours_ = 0L; - - disableEarlyStopping_ = false; - - additionalOptimizationObjectiveConfigCase_ = 0; - additionalOptimizationObjectiveConfig_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Tables - .internal_static_google_cloud_automl_v1beta1_TablesModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelMetadata build() { - com.google.cloud.automl.v1beta1.TablesModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TablesModelMetadata result = - new com.google.cloud.automl.v1beta1.TablesModelMetadata(this); - int from_bitField0_ = bitField0_; - if (additionalOptimizationObjectiveConfigCase_ == 17) { - result.additionalOptimizationObjectiveConfig_ = additionalOptimizationObjectiveConfig_; - } - if (additionalOptimizationObjectiveConfigCase_ == 18) { - result.additionalOptimizationObjectiveConfig_ = additionalOptimizationObjectiveConfig_; - } - if (targetColumnSpecBuilder_ == null) { - result.targetColumnSpec_ = targetColumnSpec_; - } else { - result.targetColumnSpec_ = targetColumnSpecBuilder_.build(); - } - if (inputFeatureColumnSpecsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - inputFeatureColumnSpecs_ = - java.util.Collections.unmodifiableList(inputFeatureColumnSpecs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.inputFeatureColumnSpecs_ = inputFeatureColumnSpecs_; - } else { - result.inputFeatureColumnSpecs_ = inputFeatureColumnSpecsBuilder_.build(); - } - result.optimizationObjective_ = optimizationObjective_; - if (tablesModelColumnInfoBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - tablesModelColumnInfo_ = java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.tablesModelColumnInfo_ = tablesModelColumnInfo_; - } else { - result.tablesModelColumnInfo_ = tablesModelColumnInfoBuilder_.build(); - } - result.trainBudgetMilliNodeHours_ = trainBudgetMilliNodeHours_; - result.trainCostMilliNodeHours_ = trainCostMilliNodeHours_; - result.disableEarlyStopping_ = disableEarlyStopping_; - 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.automl.v1beta1.TablesModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TablesModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TablesModelMetadata other) { - if (other == com.google.cloud.automl.v1beta1.TablesModelMetadata.getDefaultInstance()) - return this; - if (other.hasTargetColumnSpec()) { - mergeTargetColumnSpec(other.getTargetColumnSpec()); - } - if (inputFeatureColumnSpecsBuilder_ == null) { - if (!other.inputFeatureColumnSpecs_.isEmpty()) { - if (inputFeatureColumnSpecs_.isEmpty()) { - inputFeatureColumnSpecs_ = other.inputFeatureColumnSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.addAll(other.inputFeatureColumnSpecs_); - } - onChanged(); - } - } else { - if (!other.inputFeatureColumnSpecs_.isEmpty()) { - if (inputFeatureColumnSpecsBuilder_.isEmpty()) { - inputFeatureColumnSpecsBuilder_.dispose(); - inputFeatureColumnSpecsBuilder_ = null; - inputFeatureColumnSpecs_ = other.inputFeatureColumnSpecs_; - bitField0_ = (bitField0_ & ~0x00000001); - inputFeatureColumnSpecsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getInputFeatureColumnSpecsFieldBuilder() - : null; - } else { - inputFeatureColumnSpecsBuilder_.addAllMessages(other.inputFeatureColumnSpecs_); - } - } - } - if (!other.getOptimizationObjective().isEmpty()) { - optimizationObjective_ = other.optimizationObjective_; - onChanged(); - } - if (tablesModelColumnInfoBuilder_ == null) { - if (!other.tablesModelColumnInfo_.isEmpty()) { - if (tablesModelColumnInfo_.isEmpty()) { - tablesModelColumnInfo_ = other.tablesModelColumnInfo_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.addAll(other.tablesModelColumnInfo_); - } - onChanged(); - } - } else { - if (!other.tablesModelColumnInfo_.isEmpty()) { - if (tablesModelColumnInfoBuilder_.isEmpty()) { - tablesModelColumnInfoBuilder_.dispose(); - tablesModelColumnInfoBuilder_ = null; - tablesModelColumnInfo_ = other.tablesModelColumnInfo_; - bitField0_ = (bitField0_ & ~0x00000002); - tablesModelColumnInfoBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getTablesModelColumnInfoFieldBuilder() - : null; - } else { - tablesModelColumnInfoBuilder_.addAllMessages(other.tablesModelColumnInfo_); - } - } - } - if (other.getTrainBudgetMilliNodeHours() != 0L) { - setTrainBudgetMilliNodeHours(other.getTrainBudgetMilliNodeHours()); - } - if (other.getTrainCostMilliNodeHours() != 0L) { - setTrainCostMilliNodeHours(other.getTrainCostMilliNodeHours()); - } - if (other.getDisableEarlyStopping() != false) { - setDisableEarlyStopping(other.getDisableEarlyStopping()); - } - 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.automl.v1beta1.TablesModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TablesModelMetadata) 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 = 17; - * - * @return The optimizationObjectiveRecallValue. - */ - public float getOptimizationObjectiveRecallValue() { - if (additionalOptimizationObjectiveConfigCase_ == 17) { - 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 = 17; - * - * @param value The optimizationObjectiveRecallValue to set. - * @return This builder for chaining. - */ - public Builder setOptimizationObjectiveRecallValue(float value) { - additionalOptimizationObjectiveConfigCase_ = 17; - 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 = 17; - * - * @return This builder for chaining. - */ - public Builder clearOptimizationObjectiveRecallValue() { - if (additionalOptimizationObjectiveConfigCase_ == 17) { - 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 = 18; - * - * @return The optimizationObjectivePrecisionValue. - */ - public float getOptimizationObjectivePrecisionValue() { - if (additionalOptimizationObjectiveConfigCase_ == 18) { - 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 = 18; - * - * @param value The optimizationObjectivePrecisionValue to set. - * @return This builder for chaining. - */ - public Builder setOptimizationObjectivePrecisionValue(float value) { - additionalOptimizationObjectiveConfigCase_ = 18; - 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 = 18; - * - * @return This builder for chaining. - */ - public Builder clearOptimizationObjectivePrecisionValue() { - if (additionalOptimizationObjectiveConfigCase_ == 18) { - additionalOptimizationObjectiveConfigCase_ = 0; - additionalOptimizationObjectiveConfig_ = null; - onChanged(); - } - return this; - } - - private com.google.cloud.automl.v1beta1.ColumnSpec targetColumnSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - targetColumnSpecBuilder_; - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - * - * @return Whether the targetColumnSpec field is set. - */ - public boolean hasTargetColumnSpec() { - return targetColumnSpecBuilder_ != null || targetColumnSpec_ != null; - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - * - * @return The targetColumnSpec. - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getTargetColumnSpec() { - if (targetColumnSpecBuilder_ == null) { - return targetColumnSpec_ == null - ? com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance() - : targetColumnSpec_; - } else { - return targetColumnSpecBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - public Builder setTargetColumnSpec(com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (targetColumnSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - targetColumnSpec_ = value; - onChanged(); - } else { - targetColumnSpecBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - public Builder setTargetColumnSpec( - com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (targetColumnSpecBuilder_ == null) { - targetColumnSpec_ = builderForValue.build(); - onChanged(); - } else { - targetColumnSpecBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - public Builder mergeTargetColumnSpec(com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (targetColumnSpecBuilder_ == null) { - if (targetColumnSpec_ != null) { - targetColumnSpec_ = - com.google.cloud.automl.v1beta1.ColumnSpec.newBuilder(targetColumnSpec_) - .mergeFrom(value) - .buildPartial(); - } else { - targetColumnSpec_ = value; - } - onChanged(); - } else { - targetColumnSpecBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - public Builder clearTargetColumnSpec() { - if (targetColumnSpecBuilder_ == null) { - targetColumnSpec_ = null; - onChanged(); - } else { - targetColumnSpec_ = null; - targetColumnSpecBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder getTargetColumnSpecBuilder() { - - onChanged(); - return getTargetColumnSpecFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getTargetColumnSpecOrBuilder() { - if (targetColumnSpecBuilder_ != null) { - return targetColumnSpecBuilder_.getMessageOrBuilder(); - } else { - return targetColumnSpec_ == null - ? com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance() - : targetColumnSpec_; - } - } - /** - * - * - *
-     * Column spec of the dataset's primary table's column the model is
-     * predicting. Snapshotted when model creation started.
-     * Only 3 fields are used:
-     * name - May be set on CreateModel, if it's not then the ColumnSpec
-     *        corresponding to the current target_column_spec_id of the dataset
-     *        the model is trained from is used.
-     *        If neither is set, CreateModel will error.
-     * display_name - Output only.
-     * data_type - Output only.
-     * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - getTargetColumnSpecFieldBuilder() { - if (targetColumnSpecBuilder_ == null) { - targetColumnSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder>( - getTargetColumnSpec(), getParentForChildren(), isClean()); - targetColumnSpec_ = null; - } - return targetColumnSpecBuilder_; - } - - private java.util.List inputFeatureColumnSpecs_ = - java.util.Collections.emptyList(); - - private void ensureInputFeatureColumnSpecsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - inputFeatureColumnSpecs_ = - new java.util.ArrayList( - inputFeatureColumnSpecs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - inputFeatureColumnSpecsBuilder_; - - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public java.util.List - getInputFeatureColumnSpecsList() { - if (inputFeatureColumnSpecsBuilder_ == null) { - return java.util.Collections.unmodifiableList(inputFeatureColumnSpecs_); - } else { - return inputFeatureColumnSpecsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public int getInputFeatureColumnSpecsCount() { - if (inputFeatureColumnSpecsBuilder_ == null) { - return inputFeatureColumnSpecs_.size(); - } else { - return inputFeatureColumnSpecsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getInputFeatureColumnSpecs(int index) { - if (inputFeatureColumnSpecsBuilder_ == null) { - return inputFeatureColumnSpecs_.get(index); - } else { - return inputFeatureColumnSpecsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder setInputFeatureColumnSpecs( - int index, com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (inputFeatureColumnSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.set(index, value); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder setInputFeatureColumnSpecs( - int index, com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (inputFeatureColumnSpecsBuilder_ == null) { - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.set(index, builderForValue.build()); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder addInputFeatureColumnSpecs(com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (inputFeatureColumnSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.add(value); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder addInputFeatureColumnSpecs( - int index, com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (inputFeatureColumnSpecsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.add(index, value); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder addInputFeatureColumnSpecs( - com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (inputFeatureColumnSpecsBuilder_ == null) { - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.add(builderForValue.build()); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder addInputFeatureColumnSpecs( - int index, com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (inputFeatureColumnSpecsBuilder_ == null) { - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.add(index, builderForValue.build()); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder addAllInputFeatureColumnSpecs( - java.lang.Iterable values) { - if (inputFeatureColumnSpecsBuilder_ == null) { - ensureInputFeatureColumnSpecsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputFeatureColumnSpecs_); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder clearInputFeatureColumnSpecs() { - if (inputFeatureColumnSpecsBuilder_ == null) { - inputFeatureColumnSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public Builder removeInputFeatureColumnSpecs(int index) { - if (inputFeatureColumnSpecsBuilder_ == null) { - ensureInputFeatureColumnSpecsIsMutable(); - inputFeatureColumnSpecs_.remove(index); - onChanged(); - } else { - inputFeatureColumnSpecsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder getInputFeatureColumnSpecsBuilder( - int index) { - return getInputFeatureColumnSpecsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getInputFeatureColumnSpecsOrBuilder( - int index) { - if (inputFeatureColumnSpecsBuilder_ == null) { - return inputFeatureColumnSpecs_.get(index); - } else { - return inputFeatureColumnSpecsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public java.util.List - getInputFeatureColumnSpecsOrBuilderList() { - if (inputFeatureColumnSpecsBuilder_ != null) { - return inputFeatureColumnSpecsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(inputFeatureColumnSpecs_); - } - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder addInputFeatureColumnSpecsBuilder() { - return getInputFeatureColumnSpecsFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance()); - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder addInputFeatureColumnSpecsBuilder( - int index) { - return getInputFeatureColumnSpecsFieldBuilder() - .addBuilder(index, com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance()); - } - /** - * - * - *
-     * Column specs of the dataset's primary table's columns, on which
-     * the model is trained and which are used as the input for predictions.
-     * The
-     * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-     * as well as, according to dataset's state upon model creation,
-     * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-     * and
-     * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-     * must never be included here.
-     * Only 3 fields are used:
-     * * name - May be set on CreateModel, if set only the columns specified are
-     *   used, otherwise all primary table's columns (except the ones listed
-     *   above) are used for the training and prediction input.
-     * * display_name - Output only.
-     * * data_type - Output only.
-     * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - public java.util.List - getInputFeatureColumnSpecsBuilderList() { - return getInputFeatureColumnSpecsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - getInputFeatureColumnSpecsFieldBuilder() { - if (inputFeatureColumnSpecsBuilder_ == null) { - inputFeatureColumnSpecsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder>( - inputFeatureColumnSpecs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - inputFeatureColumnSpecs_ = null; - } - return inputFeatureColumnSpecsBuilder_; - } - - 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 java.util.List - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - - private void ensureTablesModelColumnInfoIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - tablesModelColumnInfo_ = - new java.util.ArrayList( - tablesModelColumnInfo_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder, - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder> - tablesModelColumnInfoBuilder_; - - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public java.util.List - getTablesModelColumnInfoList() { - if (tablesModelColumnInfoBuilder_ == null) { - return java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - } else { - return tablesModelColumnInfoBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public int getTablesModelColumnInfoCount() { - if (tablesModelColumnInfoBuilder_ == null) { - return tablesModelColumnInfo_.size(); - } else { - return tablesModelColumnInfoBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo getTablesModelColumnInfo( - int index) { - if (tablesModelColumnInfoBuilder_ == null) { - return tablesModelColumnInfo_.get(index); - } else { - return tablesModelColumnInfoBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder setTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo value) { - if (tablesModelColumnInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.set(index, value); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder setTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder builderForValue) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.set(index, builderForValue.build()); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder addTablesModelColumnInfo( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo value) { - if (tablesModelColumnInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(value); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder addTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo value) { - if (tablesModelColumnInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(index, value); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder addTablesModelColumnInfo( - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder builderForValue) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(builderForValue.build()); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder addTablesModelColumnInfo( - int index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder builderForValue) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.add(index, builderForValue.build()); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder addAllTablesModelColumnInfo( - java.lang.Iterable - values) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tablesModelColumnInfo_); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder clearTablesModelColumnInfo() { - if (tablesModelColumnInfoBuilder_ == null) { - tablesModelColumnInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public Builder removeTablesModelColumnInfo(int index) { - if (tablesModelColumnInfoBuilder_ == null) { - ensureTablesModelColumnInfoIsMutable(); - tablesModelColumnInfo_.remove(index); - onChanged(); - } else { - tablesModelColumnInfoBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder - getTablesModelColumnInfoBuilder(int index) { - return getTablesModelColumnInfoFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder - getTablesModelColumnInfoOrBuilder(int index) { - if (tablesModelColumnInfoBuilder_ == null) { - return tablesModelColumnInfo_.get(index); - } else { - return tablesModelColumnInfoBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public java.util.List - getTablesModelColumnInfoOrBuilderList() { - if (tablesModelColumnInfoBuilder_ != null) { - return tablesModelColumnInfoBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tablesModelColumnInfo_); - } - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder - addTablesModelColumnInfoBuilder() { - return getTablesModelColumnInfoFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.TablesModelColumnInfo.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder - addTablesModelColumnInfoBuilder(int index) { - return getTablesModelColumnInfoFieldBuilder() - .addBuilder( - index, com.google.cloud.automl.v1beta1.TablesModelColumnInfo.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Auxiliary information for each of the
-     * input_feature_column_specs with respect to this particular model.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - public java.util.List - getTablesModelColumnInfoBuilderList() { - return getTablesModelColumnInfoFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder, - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder> - getTablesModelColumnInfoFieldBuilder() { - if (tablesModelColumnInfoBuilder_ == null) { - tablesModelColumnInfoBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TablesModelColumnInfo, - com.google.cloud.automl.v1beta1.TablesModelColumnInfo.Builder, - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder>( - tablesModelColumnInfo_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - tablesModelColumnInfo_ = null; - } - return tablesModelColumnInfoBuilder_; - } - - private long trainBudgetMilliNodeHours_; - /** - * - * - *
-     * Required. The train budget of creating this model, expressed in milli node
-     * hours i.e. 1,000 value in this field means 1 node hour.
-     * The training cost of the model will not exceed this budget. The final cost
-     * will be attempted to be close to the budget, though may end up being (even)
-     * noticeably smaller - at the backend's discretion. This especially may
-     * happen when further model training ceases to provide any improvements.
-     * If the budget is set to a value known to be insufficient to train a
-     * model for the given dataset, the training won't be attempted and
-     * will error.
-     * The train budget must be between 1,000 and 72,000 milli node hours,
-     * inclusive.
-     * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return The trainBudgetMilliNodeHours. - */ - public long getTrainBudgetMilliNodeHours() { - return trainBudgetMilliNodeHours_; - } - /** - * - * - *
-     * Required. The train budget of creating this model, expressed in milli node
-     * hours i.e. 1,000 value in this field means 1 node hour.
-     * The training cost of the model will not exceed this budget. The final cost
-     * will be attempted to be close to the budget, though may end up being (even)
-     * noticeably smaller - at the backend's discretion. This especially may
-     * happen when further model training ceases to provide any improvements.
-     * If the budget is set to a value known to be insufficient to train a
-     * model for the given dataset, the training won't be attempted and
-     * will error.
-     * The train budget must be between 1,000 and 72,000 milli node hours,
-     * inclusive.
-     * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @param value The trainBudgetMilliNodeHours to set. - * @return This builder for chaining. - */ - public Builder setTrainBudgetMilliNodeHours(long value) { - - trainBudgetMilliNodeHours_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The train budget of creating this model, expressed in milli node
-     * hours i.e. 1,000 value in this field means 1 node hour.
-     * The training cost of the model will not exceed this budget. The final cost
-     * will be attempted to be close to the budget, though may end up being (even)
-     * noticeably smaller - at the backend's discretion. This especially may
-     * happen when further model training ceases to provide any improvements.
-     * If the budget is set to a value known to be insufficient to train a
-     * model for the given dataset, the training won't be attempted and
-     * will error.
-     * The train budget must be between 1,000 and 72,000 milli node hours,
-     * inclusive.
-     * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return This builder for chaining. - */ - public Builder clearTrainBudgetMilliNodeHours() { - - trainBudgetMilliNodeHours_ = 0L; - onChanged(); - return this; - } - - private 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 = 7; - * - * @return The trainCostMilliNodeHours. - */ - 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 = 7; - * - * @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 = 7; - * - * @return This builder for chaining. - */ - public Builder clearTrainCostMilliNodeHours() { - - trainCostMilliNodeHours_ = 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 = 12; - * - * @return The disableEarlyStopping. - */ - 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 = 12; - * - * @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 = 12; - * - * @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.automl.v1beta1.TablesModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TablesModelMetadata) - private static final com.google.cloud.automl.v1beta1.TablesModelMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TablesModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TablesModelMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TablesModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TablesModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TablesModelMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadataOrBuilder.java deleted file mode 100644 index 47b3a1106..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TablesModelMetadataOrBuilder.java +++ /dev/null @@ -1,419 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/tables.proto - -package com.google.cloud.automl.v1beta1; - -public interface TablesModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TablesModelMetadata) - 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 = 17; - * - * @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 = 18; - * - * @return The optimizationObjectivePrecisionValue. - */ - float getOptimizationObjectivePrecisionValue(); - - /** - * - * - *
-   * Column spec of the dataset's primary table's column the model is
-   * predicting. Snapshotted when model creation started.
-   * Only 3 fields are used:
-   * name - May be set on CreateModel, if it's not then the ColumnSpec
-   *        corresponding to the current target_column_spec_id of the dataset
-   *        the model is trained from is used.
-   *        If neither is set, CreateModel will error.
-   * display_name - Output only.
-   * data_type - Output only.
-   * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - * - * @return Whether the targetColumnSpec field is set. - */ - boolean hasTargetColumnSpec(); - /** - * - * - *
-   * Column spec of the dataset's primary table's column the model is
-   * predicting. Snapshotted when model creation started.
-   * Only 3 fields are used:
-   * name - May be set on CreateModel, if it's not then the ColumnSpec
-   *        corresponding to the current target_column_spec_id of the dataset
-   *        the model is trained from is used.
-   *        If neither is set, CreateModel will error.
-   * display_name - Output only.
-   * data_type - Output only.
-   * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - * - * @return The targetColumnSpec. - */ - com.google.cloud.automl.v1beta1.ColumnSpec getTargetColumnSpec(); - /** - * - * - *
-   * Column spec of the dataset's primary table's column the model is
-   * predicting. Snapshotted when model creation started.
-   * Only 3 fields are used:
-   * name - May be set on CreateModel, if it's not then the ColumnSpec
-   *        corresponding to the current target_column_spec_id of the dataset
-   *        the model is trained from is used.
-   *        If neither is set, CreateModel will error.
-   * display_name - Output only.
-   * data_type - Output only.
-   * 
- * - * .google.cloud.automl.v1beta1.ColumnSpec target_column_spec = 2; - */ - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getTargetColumnSpecOrBuilder(); - - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - java.util.List getInputFeatureColumnSpecsList(); - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - com.google.cloud.automl.v1beta1.ColumnSpec getInputFeatureColumnSpecs(int index); - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - int getInputFeatureColumnSpecsCount(); - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - java.util.List - getInputFeatureColumnSpecsOrBuilderList(); - /** - * - * - *
-   * Column specs of the dataset's primary table's columns, on which
-   * the model is trained and which are used as the input for predictions.
-   * The
-   * [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]
-   * as well as, according to dataset's state upon model creation,
-   * [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id],
-   * and
-   * [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id]
-   * must never be included here.
-   * Only 3 fields are used:
-   * * name - May be set on CreateModel, if set only the columns specified are
-   *   used, otherwise all primary table's columns (except the ones listed
-   *   above) are used for the training and prediction input.
-   * * display_name - Output only.
-   * * data_type - Output only.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.ColumnSpec input_feature_column_specs = 3; - */ - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getInputFeatureColumnSpecsOrBuilder( - 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(); - - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - java.util.List - getTablesModelColumnInfoList(); - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - com.google.cloud.automl.v1beta1.TablesModelColumnInfo getTablesModelColumnInfo(int index); - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - int getTablesModelColumnInfoCount(); - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - java.util.List - getTablesModelColumnInfoOrBuilderList(); - /** - * - * - *
-   * Output only. Auxiliary information for each of the
-   * input_feature_column_specs with respect to this particular model.
-   * 
- * - * repeated .google.cloud.automl.v1beta1.TablesModelColumnInfo tables_model_column_info = 5; - * - */ - com.google.cloud.automl.v1beta1.TablesModelColumnInfoOrBuilder getTablesModelColumnInfoOrBuilder( - int index); - - /** - * - * - *
-   * Required. The train budget of creating this model, expressed in milli node
-   * hours i.e. 1,000 value in this field means 1 node hour.
-   * The training cost of the model will not exceed this budget. The final cost
-   * will be attempted to be close to the budget, though may end up being (even)
-   * noticeably smaller - at the backend's discretion. This especially may
-   * happen when further model training ceases to provide any improvements.
-   * If the budget is set to a value known to be insufficient to train a
-   * model for the given dataset, the training won't be attempted and
-   * will error.
-   * The train budget must be between 1,000 and 72,000 milli node hours,
-   * inclusive.
-   * 
- * - * int64 train_budget_milli_node_hours = 6; - * - * @return The trainBudgetMilliNodeHours. - */ - long getTrainBudgetMilliNodeHours(); - - /** - * - * - *
-   * 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 = 7; - * - * @return The trainCostMilliNodeHours. - */ - long getTrainCostMilliNodeHours(); - - /** - * - * - *
-   * 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 = 12; - * - * @return The disableEarlyStopping. - */ - boolean getDisableEarlyStopping(); - - public com.google.cloud.automl.v1beta1.TablesModelMetadata - .AdditionalOptimizationObjectiveConfigCase - getAdditionalOptimizationObjectiveConfigCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Temporal.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Temporal.java deleted file mode 100644 index d095e6df2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/Temporal.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/temporal.proto - -package com.google.cloud.automl.v1beta1; - -public final class Temporal { - private Temporal() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TimeSegment_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TimeSegment_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n*google/cloud/automl/v1beta1/temporal.p" - + "roto\022\033google.cloud.automl.v1beta1\032\036googl" - + "e/protobuf/duration.proto\032\034google/api/an" - + "notations.proto\"w\n\013TimeSegment\0224\n\021start_" - + "time_offset\030\001 \001(\0132\031.google.protobuf.Dura" - + "tion\0222\n\017end_time_offset\030\002 \001(\0132\031.google.p" - + "rotobuf.DurationB\245\001\n\037com.google.cloud.au" - + "toml.v1beta1P\001ZAgoogle.golang.org/genpro" - + "to/googleapis/cloud/automl/v1beta1;autom" - + "l\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002\036Google" - + "::Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.DurationProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TimeSegment_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TimeSegment_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TimeSegment_descriptor, - new java.lang.String[] { - "StartTimeOffset", "EndTimeOffset", - }); - com.google.protobuf.DurationProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadata.java deleted file mode 100644 index a17507f47..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadata.java +++ /dev/null @@ -1,628 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata for classification.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} - */ -public final class TextClassificationDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - TextClassificationDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextClassificationDatasetMetadata.newBuilder() to construct. - private TextClassificationDatasetMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextClassificationDatasetMetadata() { - classificationType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextClassificationDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextClassificationDatasetMetadata( - 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(); - - classificationType_ = 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.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder.class); - } - - public static final int CLASSIFICATION_TYPE_FIELD_NUMBER = 1; - private int classificationType_; - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The enum numeric value on the wire for classificationType. - */ - public int getClassificationTypeValue() { - return classificationType_; - } - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The classificationType. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - getClassificationType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType result = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.valueOf( - classificationType_); - return result == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.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 (classificationType_ - != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - .CLASSIFICATION_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, classificationType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (classificationType_ - != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - .CLASSIFICATION_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, classificationType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata other = - (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) obj; - - if (classificationType_ != other.classificationType_) return false; - if (!unknownFields.equals(other.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) + CLASSIFICATION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + classificationType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata for classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextClassificationDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - classificationType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata build() { - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata result = - new com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata(this); - result.classificationType_ = classificationType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata.getDefaultInstance()) - return this; - if (other.classificationType_ != 0) { - setClassificationTypeValue(other.getClassificationTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int classificationType_ = 0; - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The enum numeric value on the wire for classificationType. - */ - public int getClassificationTypeValue() { - return classificationType_; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @param value The enum numeric value on the wire for classificationType to set. - * @return This builder for chaining. - */ - public Builder setClassificationTypeValue(int value) { - classificationType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The classificationType. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - getClassificationType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType result = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.valueOf( - classificationType_); - return result == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @param value The classificationType to set. - * @return This builder for chaining. - */ - public Builder setClassificationType( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType value) { - if (value == null) { - throw new NullPointerException(); - } - - classificationType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Type of the classification problem.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return This builder for chaining. - */ - public Builder clearClassificationType() { - - classificationType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextClassificationDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextClassificationDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationDatasetMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadataOrBuilder.java deleted file mode 100644 index e325c9c8d..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextClassificationDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextClassificationDatasetMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The enum numeric value on the wire for classificationType. - */ - int getClassificationTypeValue(); - /** - * - * - *
-   * Required. Type of the classification problem.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 1; - * - * @return The classificationType. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType getClassificationType(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadata.java deleted file mode 100644 index dd137b2b6..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadata.java +++ /dev/null @@ -1,626 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata that is specific to text classification.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextClassificationModelMetadata} - */ -public final class TextClassificationModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextClassificationModelMetadata) - TextClassificationModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextClassificationModelMetadata.newBuilder() to construct. - private TextClassificationModelMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextClassificationModelMetadata() { - classificationType_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextClassificationModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextClassificationModelMetadata( - 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: - { - int rawValue = input.readEnum(); - - classificationType_ = 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.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.class, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder.class); - } - - public static final int CLASSIFICATION_TYPE_FIELD_NUMBER = 3; - private int classificationType_; - /** - * - * - *
-   * Output only. Classification type of the dataset used to train this model.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @return The enum numeric value on the wire for classificationType. - */ - public int getClassificationTypeValue() { - return classificationType_; - } - /** - * - * - *
-   * Output only. Classification type of the dataset used to train this model.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @return The classificationType. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - getClassificationType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType result = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.valueOf( - classificationType_); - return result == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.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 (classificationType_ - != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - .CLASSIFICATION_TYPE_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, classificationType_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (classificationType_ - != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - .CLASSIFICATION_TYPE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, classificationType_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextClassificationModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata other = - (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) obj; - - if (classificationType_ != other.classificationType_) return false; - if (!unknownFields.equals(other.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) + CLASSIFICATION_TYPE_FIELD_NUMBER; - hash = (53 * hash) + classificationType_; - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Model metadata that is specific to text classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextClassificationModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextClassificationModelMetadata) - com.google.cloud.automl.v1beta1.TextClassificationModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.class, - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - classificationType_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadata build() { - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata result = - new com.google.cloud.automl.v1beta1.TextClassificationModelMetadata(this); - result.classificationType_ = classificationType_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.TextClassificationModelMetadata.getDefaultInstance()) - return this; - if (other.classificationType_ != 0) { - setClassificationTypeValue(other.getClassificationTypeValue()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextClassificationModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextClassificationModelMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int classificationType_ = 0; - /** - * - * - *
-     * Output only. Classification type of the dataset used to train this model.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @return The enum numeric value on the wire for classificationType. - */ - public int getClassificationTypeValue() { - return classificationType_; - } - /** - * - * - *
-     * Output only. Classification type of the dataset used to train this model.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @param value The enum numeric value on the wire for classificationType to set. - * @return This builder for chaining. - */ - public Builder setClassificationTypeValue(int value) { - classificationType_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Classification type of the dataset used to train this model.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @return The classificationType. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType - getClassificationType() { - @SuppressWarnings("deprecation") - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType result = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.valueOf( - classificationType_); - return result == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. Classification type of the dataset used to train this model.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @param value The classificationType to set. - * @return This builder for chaining. - */ - public Builder setClassificationType( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType value) { - if (value == null) { - throw new NullPointerException(); - } - - classificationType_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Classification type of the dataset used to train this model.
-     * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @return This builder for chaining. - */ - public Builder clearClassificationType() { - - classificationType_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextClassificationModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextClassificationModelMetadata) - private static final com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextClassificationModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextClassificationModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextClassificationModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextClassificationModelMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadataOrBuilder.java deleted file mode 100644 index ff15e530c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextClassificationModelMetadataOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextClassificationModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextClassificationModelMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. Classification type of the dataset used to train this model.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @return The enum numeric value on the wire for classificationType. - */ - int getClassificationTypeValue(); - /** - * - * - *
-   * Output only. Classification type of the dataset used to train this model.
-   * 
- * - * .google.cloud.automl.v1beta1.ClassificationType classification_type = 3; - * - * @return The classificationType. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationType getClassificationType(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtraction.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtraction.java deleted file mode 100644 index 9cc378d9e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtraction.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_extraction.proto - -package com.google.cloud.automl.v1beta1; - -public final class TextExtraction { - private TextExtraction() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_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/automl/v1beta1/text_extra" - + "ction.proto\022\033google.cloud.automl.v1beta1" - + "\032.google/cloud/automl/v1beta1/text_segme" - + "nt.proto\032\034google/api/annotations.proto\"y" - + "\n\030TextExtractionAnnotation\022@\n\014text_segme" - + "nt\030\003 \001(\0132(.google.cloud.automl.v1beta1.T" - + "extSegmentH\000\022\r\n\005score\030\001 \001(\002B\014\n\nannotatio" - + "n\"\227\002\n\037TextExtractionEvaluationMetrics\022\016\n" - + "\006au_prc\030\001 \001(\002\022w\n\032confidence_metrics_entr" - + "ies\030\002 \003(\0132S.google.cloud.automl.v1beta1." - + "TextExtractionEvaluationMetrics.Confiden" - + "ceMetricsEntry\032k\n\026ConfidenceMetricsEntry" - + "\022\034\n\024confidence_threshold\030\001 \001(\002\022\016\n\006recall" - + "\030\003 \001(\002\022\021\n\tprecision\030\004 \001(\002\022\020\n\010f1_score\030\005 " - + "\001(\002B\245\001\n\037com.google.cloud.automl.v1beta1P" - + "\001ZAgoogle.golang.org/genproto/googleapis" - + "/cloud/automl/v1beta1;automl\312\002\033Google\\Cl" - + "oud\\AutoMl\\V1beta1\352\002\036Google::Cloud::Auto" - + "ML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.TextSegmentProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_descriptor, - new java.lang.String[] { - "TextSegment", "Score", "Annotation", - }); - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_descriptor, - new java.lang.String[] { - "AuPrc", "ConfidenceMetricsEntries", - }); - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_descriptor = - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_descriptor, - new java.lang.String[] { - "ConfidenceThreshold", "Recall", "Precision", "F1Score", - }); - com.google.cloud.automl.v1beta1.TextSegmentProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotation.java deleted file mode 100644 index da12b8251..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotation.java +++ /dev/null @@ -1,936 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_extraction.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Annotation for identifying spans of text.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionAnnotation} - */ -public final class TextExtractionAnnotation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextExtractionAnnotation) - TextExtractionAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextExtractionAnnotation.newBuilder() to construct. - private TextExtractionAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextExtractionAnnotation() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextExtractionAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextExtractionAnnotation( - 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: - { - score_ = input.readFloat(); - break; - } - case 26: - { - com.google.cloud.automl.v1beta1.TextSegment.Builder subBuilder = null; - if (annotationCase_ == 3) { - subBuilder = - ((com.google.cloud.automl.v1beta1.TextSegment) annotation_).toBuilder(); - } - annotation_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSegment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.automl.v1beta1.TextSegment) annotation_); - annotation_ = subBuilder.buildPartial(); - } - annotationCase_ = 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.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.class, - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder.class); - } - - private int annotationCase_ = 0; - private java.lang.Object annotation_; - - public enum AnnotationCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - TEXT_SEGMENT(3), - ANNOTATION_NOT_SET(0); - private final int value; - - private AnnotationCase(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 AnnotationCase valueOf(int value) { - return forNumber(value); - } - - public static AnnotationCase forNumber(int value) { - switch (value) { - case 3: - return TEXT_SEGMENT; - case 0: - return ANNOTATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public AnnotationCase getAnnotationCase() { - return AnnotationCase.forNumber(annotationCase_); - } - - public static final int TEXT_SEGMENT_FIELD_NUMBER = 3; - /** - * - * - *
-   * An entity annotation will set this, which is the part of the original
-   * text to which the annotation pertains.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - * - * @return Whether the textSegment field is set. - */ - public boolean hasTextSegment() { - return annotationCase_ == 3; - } - /** - * - * - *
-   * An entity annotation will set this, which is the part of the original
-   * text to which the annotation pertains.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - * - * @return The textSegment. - */ - public com.google.cloud.automl.v1beta1.TextSegment getTextSegment() { - if (annotationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.TextSegment) annotation_; - } - return com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance(); - } - /** - * - * - *
-   * An entity annotation will set this, which is the part of the original
-   * text to which the annotation pertains.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - public com.google.cloud.automl.v1beta1.TextSegmentOrBuilder getTextSegmentOrBuilder() { - if (annotationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.TextSegment) annotation_; - } - return com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance(); - } - - public static final int SCORE_FIELD_NUMBER = 1; - private float score_; - /** - * - * - *
-   * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-   * means greater confidence in correctness of the annotation.
-   * 
- * - * float score = 1; - * - * @return The score. - */ - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (score_ != 0F) { - output.writeFloat(1, score_); - } - if (annotationCase_ == 3) { - output.writeMessage(3, (com.google.cloud.automl.v1beta1.TextSegment) annotation_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, score_); - } - if (annotationCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.automl.v1beta1.TextSegment) annotation_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextExtractionAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextExtractionAnnotation other = - (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) obj; - - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits(other.getScore())) return false; - if (!getAnnotationCase().equals(other.getAnnotationCase())) return false; - switch (annotationCase_) { - case 3: - if (!getTextSegment().equals(other.getTextSegment())) 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) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); - switch (annotationCase_) { - case 3: - hash = (37 * hash) + TEXT_SEGMENT_FIELD_NUMBER; - hash = (53 * hash) + getTextSegment().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextExtractionAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Annotation for identifying spans of text.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionAnnotation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextExtractionAnnotation) - com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.class, - com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextExtractionAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - score_ = 0F; - - annotationCase_ = 0; - annotation_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation build() { - com.google.cloud.automl.v1beta1.TextExtractionAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation buildPartial() { - com.google.cloud.automl.v1beta1.TextExtractionAnnotation result = - new com.google.cloud.automl.v1beta1.TextExtractionAnnotation(this); - if (annotationCase_ == 3) { - if (textSegmentBuilder_ == null) { - result.annotation_ = annotation_; - } else { - result.annotation_ = textSegmentBuilder_.build(); - } - } - result.score_ = score_; - result.annotationCase_ = annotationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextExtractionAnnotation) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextExtractionAnnotation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TextExtractionAnnotation other) { - if (other == com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance()) - return this; - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - switch (other.getAnnotationCase()) { - case TEXT_SEGMENT: - { - mergeTextSegment(other.getTextSegment()); - break; - } - case ANNOTATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextExtractionAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int annotationCase_ = 0; - private java.lang.Object annotation_; - - public AnnotationCase getAnnotationCase() { - return AnnotationCase.forNumber(annotationCase_); - } - - public Builder clearAnnotation() { - annotationCase_ = 0; - annotation_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSegment, - com.google.cloud.automl.v1beta1.TextSegment.Builder, - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder> - textSegmentBuilder_; - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - * - * @return Whether the textSegment field is set. - */ - public boolean hasTextSegment() { - return annotationCase_ == 3; - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - * - * @return The textSegment. - */ - public com.google.cloud.automl.v1beta1.TextSegment getTextSegment() { - if (textSegmentBuilder_ == null) { - if (annotationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.TextSegment) annotation_; - } - return com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance(); - } else { - if (annotationCase_ == 3) { - return textSegmentBuilder_.getMessage(); - } - return com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance(); - } - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - public Builder setTextSegment(com.google.cloud.automl.v1beta1.TextSegment value) { - if (textSegmentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - annotation_ = value; - onChanged(); - } else { - textSegmentBuilder_.setMessage(value); - } - annotationCase_ = 3; - return this; - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - public Builder setTextSegment( - com.google.cloud.automl.v1beta1.TextSegment.Builder builderForValue) { - if (textSegmentBuilder_ == null) { - annotation_ = builderForValue.build(); - onChanged(); - } else { - textSegmentBuilder_.setMessage(builderForValue.build()); - } - annotationCase_ = 3; - return this; - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - public Builder mergeTextSegment(com.google.cloud.automl.v1beta1.TextSegment value) { - if (textSegmentBuilder_ == null) { - if (annotationCase_ == 3 - && annotation_ != com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance()) { - annotation_ = - com.google.cloud.automl.v1beta1.TextSegment.newBuilder( - (com.google.cloud.automl.v1beta1.TextSegment) annotation_) - .mergeFrom(value) - .buildPartial(); - } else { - annotation_ = value; - } - onChanged(); - } else { - if (annotationCase_ == 3) { - textSegmentBuilder_.mergeFrom(value); - } - textSegmentBuilder_.setMessage(value); - } - annotationCase_ = 3; - return this; - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - public Builder clearTextSegment() { - if (textSegmentBuilder_ == null) { - if (annotationCase_ == 3) { - annotationCase_ = 0; - annotation_ = null; - onChanged(); - } - } else { - if (annotationCase_ == 3) { - annotationCase_ = 0; - annotation_ = null; - } - textSegmentBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - public com.google.cloud.automl.v1beta1.TextSegment.Builder getTextSegmentBuilder() { - return getTextSegmentFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - public com.google.cloud.automl.v1beta1.TextSegmentOrBuilder getTextSegmentOrBuilder() { - if ((annotationCase_ == 3) && (textSegmentBuilder_ != null)) { - return textSegmentBuilder_.getMessageOrBuilder(); - } else { - if (annotationCase_ == 3) { - return (com.google.cloud.automl.v1beta1.TextSegment) annotation_; - } - return com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance(); - } - } - /** - * - * - *
-     * An entity annotation will set this, which is the part of the original
-     * text to which the annotation pertains.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSegment, - com.google.cloud.automl.v1beta1.TextSegment.Builder, - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder> - getTextSegmentFieldBuilder() { - if (textSegmentBuilder_ == null) { - if (!(annotationCase_ == 3)) { - annotation_ = com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance(); - } - textSegmentBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSegment, - com.google.cloud.automl.v1beta1.TextSegment.Builder, - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder>( - (com.google.cloud.automl.v1beta1.TextSegment) annotation_, - getParentForChildren(), - isClean()); - annotation_ = null; - } - annotationCase_ = 3; - onChanged(); - ; - return textSegmentBuilder_; - } - - private float score_; - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-     * means greater confidence in correctness of the annotation.
-     * 
- * - * float score = 1; - * - * @return The score. - */ - public float getScore() { - return score_; - } - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-     * means greater confidence in correctness of the annotation.
-     * 
- * - * float score = 1; - * - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-     * means greater confidence in correctness of the annotation.
-     * 
- * - * float score = 1; - * - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 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.automl.v1beta1.TextExtractionAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextExtractionAnnotation) - private static final com.google.cloud.automl.v1beta1.TextExtractionAnnotation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextExtractionAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextExtractionAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextExtractionAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotationOrBuilder.java deleted file mode 100644 index 53f020bca..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionAnnotationOrBuilder.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_extraction.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextExtractionAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextExtractionAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * An entity annotation will set this, which is the part of the original
-   * text to which the annotation pertains.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - * - * @return Whether the textSegment field is set. - */ - boolean hasTextSegment(); - /** - * - * - *
-   * An entity annotation will set this, which is the part of the original
-   * text to which the annotation pertains.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - * - * @return The textSegment. - */ - com.google.cloud.automl.v1beta1.TextSegment getTextSegment(); - /** - * - * - *
-   * An entity annotation will set this, which is the part of the original
-   * text to which the annotation pertains.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSegment text_segment = 3; - */ - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder getTextSegmentOrBuilder(); - - /** - * - * - *
-   * Output only. A confidence estimate between 0.0 and 1.0. A higher value
-   * means greater confidence in correctness of the annotation.
-   * 
- * - * float score = 1; - * - * @return The score. - */ - float getScore(); - - public com.google.cloud.automl.v1beta1.TextExtractionAnnotation.AnnotationCase - getAnnotationCase(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadata.java deleted file mode 100644 index 129646dc2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadata.java +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata that is specific to text extraction
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} - */ -public final class TextExtractionDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - TextExtractionDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextExtractionDatasetMetadata.newBuilder() to construct. - private TextExtractionDatasetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextExtractionDatasetMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextExtractionDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextExtractionDatasetMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata other = - (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata that is specific to text extraction
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata build() { - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata result = - new com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextExtractionDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextExtractionDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionDatasetMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadataOrBuilder.java deleted file mode 100644 index 602cb5b6a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextExtractionDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextExtractionDatasetMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetrics.java deleted file mode 100644 index 397a3860c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetrics.java +++ /dev/null @@ -1,2109 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_extraction.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model evaluation metrics for text extraction problems.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} - */ -public final class TextExtractionEvaluationMetrics extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) - TextExtractionEvaluationMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextExtractionEvaluationMetrics.newBuilder() to construct. - private TextExtractionEvaluationMetrics( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextExtractionEvaluationMetrics() { - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextExtractionEvaluationMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextExtractionEvaluationMetrics( - 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 13: - { - auPrc_ = input.readFloat(); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntries_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry>(); - mutable_bitField0_ |= 0x00000001; - } - confidenceMetricsEntries_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry.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)) { - confidenceMetricsEntries_ = - java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder.class); - } - - public interface ConfidenceMetricsEntryOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. The confidence threshold value used to compute the metrics.
-     * Only annotations with score of at least this threshold are considered to
-     * be ones the model would return.
-     * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - float getConfidenceThreshold(); - - /** - * - * - *
-     * Output only. Recall under the given confidence threshold.
-     * 
- * - * float recall = 3; - * - * @return The recall. - */ - float getRecall(); - - /** - * - * - *
-     * Output only. Precision under the given confidence threshold.
-     * 
- * - * float precision = 4; - * - * @return The precision. - */ - float getPrecision(); - - /** - * - * - *
-     * Output only. The harmonic mean of recall and precision.
-     * 
- * - * float f1_score = 5; - * - * @return The f1Score. - */ - float getF1Score(); - } - /** - * - * - *
-   * Metrics for a single confidence threshold.
-   * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} - */ - public static final class ConfidenceMetricsEntry extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) - ConfidenceMetricsEntryOrBuilder { - private static final long serialVersionUID = 0L; - // Use ConfidenceMetricsEntry.newBuilder() to construct. - private ConfidenceMetricsEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ConfidenceMetricsEntry() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ConfidenceMetricsEntry(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfidenceMetricsEntry( - 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 29: - { - recall_ = input.readFloat(); - break; - } - case 37: - { - precision_ = input.readFloat(); - break; - } - case 45: - { - f1Score_ = 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.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .class, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder.class); - } - - public static final int CONFIDENCE_THRESHOLD_FIELD_NUMBER = 1; - private float confidenceThreshold_; - /** - * - * - *
-     * Output only. The confidence threshold value used to compute the metrics.
-     * Only annotations with score of at least this threshold are considered to
-     * be ones the model would return.
-     * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - public float getConfidenceThreshold() { - return confidenceThreshold_; - } - - public static final int RECALL_FIELD_NUMBER = 3; - private float recall_; - /** - * - * - *
-     * Output only. Recall under the given confidence threshold.
-     * 
- * - * float recall = 3; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - - public static final int PRECISION_FIELD_NUMBER = 4; - private float precision_; - /** - * - * - *
-     * Output only. Precision under the given confidence threshold.
-     * 
- * - * float precision = 4; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - - public static final int F1_SCORE_FIELD_NUMBER = 5; - private float f1Score_; - /** - * - * - *
-     * Output only. The harmonic mean of recall and precision.
-     * 
- * - * float f1_score = 5; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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 (recall_ != 0F) { - output.writeFloat(3, recall_); - } - if (precision_ != 0F) { - output.writeFloat(4, precision_); - } - if (f1Score_ != 0F) { - output.writeFloat(5, f1Score_); - } - 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 (recall_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, recall_); - } - if (precision_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, precision_); - } - if (f1Score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, f1Score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry other = - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) - obj; - - if (java.lang.Float.floatToIntBits(getConfidenceThreshold()) - != java.lang.Float.floatToIntBits(other.getConfidenceThreshold())) return false; - if (java.lang.Float.floatToIntBits(getRecall()) - != java.lang.Float.floatToIntBits(other.getRecall())) return false; - if (java.lang.Float.floatToIntBits(getPrecision()) - != java.lang.Float.floatToIntBits(other.getPrecision())) return false; - if (java.lang.Float.floatToIntBits(getF1Score()) - != java.lang.Float.floatToIntBits(other.getF1Score())) return false; - if (!unknownFields.equals(other.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) + RECALL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecall()); - hash = (37 * hash) + PRECISION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getPrecision()); - hash = (37 * hash) + F1_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getF1Score()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Metrics for a single confidence threshold.
-     * 
- * - * Protobuf type {@code - * google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry.class, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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; - - recall_ = 0F; - - precision_ = 0F; - - f1Score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_ConfidenceMetricsEntry_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - build() { - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - buildPartial() { - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - result = - new com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry(this); - result.confidenceThreshold_ = confidenceThreshold_; - result.recall_ = recall_; - result.precision_ = precision_; - result.f1Score_ = f1Score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - other) { - if (other - == com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry.getDefaultInstance()) return this; - if (other.getConfidenceThreshold() != 0F) { - setConfidenceThreshold(other.getConfidenceThreshold()); - } - if (other.getRecall() != 0F) { - setRecall(other.getRecall()); - } - if (other.getPrecision() != 0F) { - setPrecision(other.getPrecision()); - } - if (other.getF1Score() != 0F) { - setF1Score(other.getF1Score()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private float confidenceThreshold_; - /** - * - * - *
-       * Output only. The confidence threshold value used to compute the metrics.
-       * Only annotations with score of at least this threshold are considered to
-       * be ones the model would return.
-       * 
- * - * float confidence_threshold = 1; - * - * @return The confidenceThreshold. - */ - public float getConfidenceThreshold() { - return confidenceThreshold_; - } - /** - * - * - *
-       * Output only. The confidence threshold value used to compute the metrics.
-       * Only annotations with score of at least this threshold are considered to
-       * be ones the model would return.
-       * 
- * - * 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; - } - /** - * - * - *
-       * Output only. The confidence threshold value used to compute the metrics.
-       * Only annotations with score of at least this threshold are considered to
-       * be ones the model would return.
-       * 
- * - * float confidence_threshold = 1; - * - * @return This builder for chaining. - */ - public Builder clearConfidenceThreshold() { - - confidenceThreshold_ = 0F; - onChanged(); - return this; - } - - private float recall_; - /** - * - * - *
-       * Output only. Recall under the given confidence threshold.
-       * 
- * - * float recall = 3; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - /** - * - * - *
-       * Output only. Recall under the given confidence threshold.
-       * 
- * - * float recall = 3; - * - * @param value The recall to set. - * @return This builder for chaining. - */ - public Builder setRecall(float value) { - - recall_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Recall under the given confidence threshold.
-       * 
- * - * float recall = 3; - * - * @return This builder for chaining. - */ - public Builder clearRecall() { - - recall_ = 0F; - onChanged(); - return this; - } - - private float precision_; - /** - * - * - *
-       * Output only. Precision under the given confidence threshold.
-       * 
- * - * float precision = 4; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - /** - * - * - *
-       * Output only. Precision under the given confidence threshold.
-       * 
- * - * float precision = 4; - * - * @param value The precision to set. - * @return This builder for chaining. - */ - public Builder setPrecision(float value) { - - precision_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Precision under the given confidence threshold.
-       * 
- * - * float precision = 4; - * - * @return This builder for chaining. - */ - public Builder clearPrecision() { - - precision_ = 0F; - onChanged(); - return this; - } - - private float f1Score_; - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 5; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 5; - * - * @param value The f1Score to set. - * @return This builder for chaining. - */ - public Builder setF1Score(float value) { - - f1Score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 5; - * - * @return This builder for chaining. - */ - public Builder clearF1Score() { - - f1Score_ = 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.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry) - private static final com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry(); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ConfidenceMetricsEntry parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfidenceMetricsEntry(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int AU_PRC_FIELD_NUMBER = 1; - private float auPrc_; - /** - * - * - *
-   * Output only. The Area under precision recall curve metric.
-   * 
- * - * float au_prc = 1; - * - * @return The auPrc. - */ - public float getAuPrc() { - return auPrc_; - } - - public static final int CONFIDENCE_METRICS_ENTRIES_FIELD_NUMBER = 2; - private java.util.List< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry> - confidenceMetricsEntries_; - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry> - getConfidenceMetricsEntriesList() { - return confidenceMetricsEntries_; - } - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesOrBuilderList() { - return confidenceMetricsEntries_; - } - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public int getConfidenceMetricsEntriesCount() { - return confidenceMetricsEntries_.size(); - } - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - getConfidenceMetricsEntries(int index) { - return confidenceMetricsEntries_.get(index); - } - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntriesOrBuilder(int index) { - return confidenceMetricsEntries_.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 (auPrc_ != 0F) { - output.writeFloat(1, auPrc_); - } - for (int i = 0; i < confidenceMetricsEntries_.size(); i++) { - output.writeMessage(2, confidenceMetricsEntries_.get(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (auPrc_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, auPrc_); - } - for (int i = 0; i < confidenceMetricsEntries_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, confidenceMetricsEntries_.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.automl.v1beta1.TextExtractionEvaluationMetrics)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics other = - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) obj; - - if (java.lang.Float.floatToIntBits(getAuPrc()) - != java.lang.Float.floatToIntBits(other.getAuPrc())) return false; - if (!getConfidenceMetricsEntriesList().equals(other.getConfidenceMetricsEntriesList())) - return false; - if (!unknownFields.equals(other.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) + AU_PRC_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getAuPrc()); - if (getConfidenceMetricsEntriesCount() > 0) { - hash = (37 * hash) + CONFIDENCE_METRICS_ENTRIES_FIELD_NUMBER; - hash = (53 * hash) + getConfidenceMetricsEntriesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 evaluation metrics for text extraction problems.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConfidenceMetricsEntriesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - auPrc_ = 0F; - - if (confidenceMetricsEntriesBuilder_ == null) { - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - confidenceMetricsEntriesBuilder_.clear(); - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextExtraction - .internal_static_google_cloud_automl_v1beta1_TextExtractionEvaluationMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics build() { - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics buildPartial() { - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics result = - new com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics(this); - int from_bitField0_ = bitField0_; - result.auPrc_ = auPrc_; - if (confidenceMetricsEntriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntries_ = - java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.confidenceMetricsEntries_ = confidenceMetricsEntries_; - } else { - result.confidenceMetricsEntries_ = confidenceMetricsEntriesBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics other) { - if (other - == com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.getDefaultInstance()) - return this; - if (other.getAuPrc() != 0F) { - setAuPrc(other.getAuPrc()); - } - if (confidenceMetricsEntriesBuilder_ == null) { - if (!other.confidenceMetricsEntries_.isEmpty()) { - if (confidenceMetricsEntries_.isEmpty()) { - confidenceMetricsEntries_ = other.confidenceMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.addAll(other.confidenceMetricsEntries_); - } - onChanged(); - } - } else { - if (!other.confidenceMetricsEntries_.isEmpty()) { - if (confidenceMetricsEntriesBuilder_.isEmpty()) { - confidenceMetricsEntriesBuilder_.dispose(); - confidenceMetricsEntriesBuilder_ = null; - confidenceMetricsEntries_ = other.confidenceMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - confidenceMetricsEntriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getConfidenceMetricsEntriesFieldBuilder() - : null; - } else { - confidenceMetricsEntriesBuilder_.addAllMessages(other.confidenceMetricsEntries_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private float auPrc_; - /** - * - * - *
-     * Output only. The Area under precision recall curve metric.
-     * 
- * - * float au_prc = 1; - * - * @return The auPrc. - */ - public float getAuPrc() { - return auPrc_; - } - /** - * - * - *
-     * Output only. The Area under precision recall curve metric.
-     * 
- * - * float au_prc = 1; - * - * @param value The auPrc to set. - * @return This builder for chaining. - */ - public Builder setAuPrc(float value) { - - auPrc_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The Area under precision recall curve metric.
-     * 
- * - * float au_prc = 1; - * - * @return This builder for chaining. - */ - public Builder clearAuPrc() { - - auPrc_ = 0F; - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry> - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - - private void ensureConfidenceMetricsEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - confidenceMetricsEntries_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry>(confidenceMetricsEntries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - confidenceMetricsEntriesBuilder_; - - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry> - getConfidenceMetricsEntriesList() { - if (confidenceMetricsEntriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - } else { - return confidenceMetricsEntriesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public int getConfidenceMetricsEntriesCount() { - if (confidenceMetricsEntriesBuilder_ == null) { - return confidenceMetricsEntries_.size(); - } else { - return confidenceMetricsEntriesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - getConfidenceMetricsEntries(int index) { - if (confidenceMetricsEntriesBuilder_ == null) { - return confidenceMetricsEntries_.get(index); - } else { - return confidenceMetricsEntriesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder setConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - value) { - if (confidenceMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.set(index, value); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder setConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder - builderForValue) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.set(index, builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder addConfidenceMetricsEntries( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - value) { - if (confidenceMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(value); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder addConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - value) { - if (confidenceMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(index, value); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder addConfidenceMetricsEntries( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder - builderForValue) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder addConfidenceMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder - builderForValue) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.add(index, builderForValue.build()); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder addAllConfidenceMetricsEntries( - java.lang.Iterable< - ? extends - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry> - values) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, confidenceMetricsEntries_); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder clearConfidenceMetricsEntries() { - if (confidenceMetricsEntriesBuilder_ == null) { - confidenceMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public Builder removeConfidenceMetricsEntries(int index) { - if (confidenceMetricsEntriesBuilder_ == null) { - ensureConfidenceMetricsEntriesIsMutable(); - confidenceMetricsEntries_.remove(index); - onChanged(); - } else { - confidenceMetricsEntriesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder - getConfidenceMetricsEntriesBuilder(int index) { - return getConfidenceMetricsEntriesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntriesOrBuilder(int index) { - if (confidenceMetricsEntriesBuilder_ == null) { - return confidenceMetricsEntries_.get(index); - } else { - return confidenceMetricsEntriesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public java.util.List< - ? extends - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesOrBuilderList() { - if (confidenceMetricsEntriesBuilder_ != null) { - return confidenceMetricsEntriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(confidenceMetricsEntries_); - } - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder - addConfidenceMetricsEntriesBuilder() { - return getConfidenceMetricsEntriesFieldBuilder() - .addBuilder( - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder - addConfidenceMetricsEntriesBuilder(int index) { - return getConfidenceMetricsEntriesFieldBuilder() - .addBuilder( - index, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Metrics that have confidence thresholds.
-     * Precision-recall curve can be derived from it.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - public java.util.List< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder> - getConfidenceMetricsEntriesBuilderList() { - return getConfidenceMetricsEntriesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - .Builder, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesFieldBuilder() { - if (confidenceMetricsEntriesBuilder_ == null) { - confidenceMetricsEntriesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder>( - confidenceMetricsEntries_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - confidenceMetricsEntries_ = null; - } - return confidenceMetricsEntriesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) - private static final com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics(); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextExtractionEvaluationMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextExtractionEvaluationMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetricsOrBuilder.java deleted file mode 100644 index 6bba49fec..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionEvaluationMetricsOrBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_extraction.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextExtractionEvaluationMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The Area under precision recall curve metric.
-   * 
- * - * float au_prc = 1; - * - * @return The auPrc. - */ - float getAuPrc(); - - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - java.util.List< - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry> - getConfidenceMetricsEntriesList(); - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry - getConfidenceMetricsEntries(int index); - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - int getConfidenceMetricsEntriesCount(); - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - java.util.List< - ? extends - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics - .ConfidenceMetricsEntryOrBuilder> - getConfidenceMetricsEntriesOrBuilderList(); - /** - * - * - *
-   * Output only. Metrics that have confidence thresholds.
-   * Precision-recall curve can be derived from it.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntry confidence_metrics_entries = 2; - * - */ - com.google.cloud.automl.v1beta1.TextExtractionEvaluationMetrics.ConfidenceMetricsEntryOrBuilder - getConfidenceMetricsEntriesOrBuilder(int index); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadata.java deleted file mode 100644 index 6cafee9e8..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadata.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata that is specific to text extraction.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionModelMetadata} - */ -public final class TextExtractionModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextExtractionModelMetadata) - TextExtractionModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextExtractionModelMetadata.newBuilder() to construct. - private TextExtractionModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextExtractionModelMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextExtractionModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextExtractionModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.class, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextExtractionModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata other = - (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Model metadata that is specific to text extraction.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextExtractionModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextExtractionModelMetadata) - com.google.cloud.automl.v1beta1.TextExtractionModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.class, - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadata build() { - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata result = - new com.google.cloud.automl.v1beta1.TextExtractionModelMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TextExtractionModelMetadata other) { - if (other == com.google.cloud.automl.v1beta1.TextExtractionModelMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextExtractionModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextExtractionModelMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextExtractionModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextExtractionModelMetadata) - private static final com.google.cloud.automl.v1beta1.TextExtractionModelMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextExtractionModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TextExtractionModelMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextExtractionModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextExtractionModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextExtractionModelMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadataOrBuilder.java deleted file mode 100644 index a1e158341..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextExtractionModelMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextExtractionModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextExtractionModelMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextProto.java deleted file mode 100644 index bee55a1c9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextProto.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -public final class TextProto { - private TextProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n&google/cloud/automl/v1beta1/text.proto" - + "\022\033google.cloud.automl.v1beta1\0320google/cl" - + "oud/automl/v1beta1/classification.proto\032" - + "\034google/api/annotations.proto\"q\n!TextCla" - + "ssificationDatasetMetadata\022L\n\023classifica" - + "tion_type\030\001 \001(\0162/.google.cloud.automl.v1" - + "beta1.ClassificationType\"o\n\037TextClassifi" - + "cationModelMetadata\022L\n\023classification_ty" - + "pe\030\003 \001(\0162/.google.cloud.automl.v1beta1.C" - + "lassificationType\"\037\n\035TextExtractionDatas" - + "etMetadata\"\035\n\033TextExtractionModelMetadat" - + "a\"5\n\034TextSentimentDatasetMetadata\022\025\n\rsen" - + "timent_max\030\001 \001(\005\"\034\n\032TextSentimentModelMe" - + "tadataB\260\001\n\037com.google.cloud.automl.v1bet" - + "a1B\tTextProtoP\001ZAgoogle.golang.org/genpr" - + "oto/googleapis/cloud/automl/v1beta1;auto" - + "ml\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002\036Googl" - + "e::Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextClassificationDatasetMetadata_descriptor, - new java.lang.String[] { - "ClassificationType", - }); - internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextClassificationModelMetadata_descriptor, - new java.lang.String[] { - "ClassificationType", - }); - internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextExtractionDatasetMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextExtractionModelMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_descriptor, - new java.lang.String[] { - "SentimentMax", - }); - internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_descriptor, - new java.lang.String[] {}); - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegment.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegment.java deleted file mode 100644 index 471cd8f51..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegment.java +++ /dev/null @@ -1,820 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_segment.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSegment} - */ -public final class TextSegment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSegment) - TextSegmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextSegment.newBuilder() to construct. - private TextSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextSegment() { - content_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextSegment(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextSegment( - 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: - { - startOffset_ = input.readInt64(); - break; - } - case 16: - { - endOffset_ = input.readInt64(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - content_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextSegmentProto - .internal_static_google_cloud_automl_v1beta1_TextSegment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextSegmentProto - .internal_static_google_cloud_automl_v1beta1_TextSegment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSegment.class, - com.google.cloud.automl.v1beta1.TextSegment.Builder.class); - } - - public static final int CONTENT_FIELD_NUMBER = 3; - private volatile java.lang.Object content_; - /** - * - * - *
-   * Output only. The content of the TextSegment.
-   * 
- * - * string content = 3; - * - * @return The content. - */ - 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; - } - } - /** - * - * - *
-   * Output only. The content of the TextSegment.
-   * 
- * - * string content = 3; - * - * @return The bytes for content. - */ - 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 START_OFFSET_FIELD_NUMBER = 1; - private long startOffset_; - /** - * - * - *
-   * Required. Zero-based character index of the first character of the text
-   * segment (counting characters from the beginning of the text).
-   * 
- * - * int64 start_offset = 1; - * - * @return The startOffset. - */ - public long getStartOffset() { - return startOffset_; - } - - public static final int END_OFFSET_FIELD_NUMBER = 2; - private long endOffset_; - /** - * - * - *
-   * Required. Zero-based character index of the first character past the end of
-   * the text segment (counting character from the beginning of the text).
-   * The character at the end_offset is NOT included in the text segment.
-   * 
- * - * int64 end_offset = 2; - * - * @return The endOffset. - */ - public long getEndOffset() { - return endOffset_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startOffset_ != 0L) { - output.writeInt64(1, startOffset_); - } - if (endOffset_ != 0L) { - output.writeInt64(2, endOffset_); - } - if (!getContentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startOffset_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, startOffset_); - } - if (endOffset_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, endOffset_); - } - if (!getContentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextSegment)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextSegment other = - (com.google.cloud.automl.v1beta1.TextSegment) obj; - - if (!getContent().equals(other.getContent())) return false; - if (getStartOffset() != other.getStartOffset()) return false; - if (getEndOffset() != other.getEndOffset()) return false; - if (!unknownFields.equals(other.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) + START_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartOffset()); - hash = (37 * hash) + END_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEndOffset()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSegment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.TextSegment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 contiguous part of a text (string), assuming it has an UTF-8 NFC encoding.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSegment} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSegment) - com.google.cloud.automl.v1beta1.TextSegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextSegmentProto - .internal_static_google_cloud_automl_v1beta1_TextSegment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextSegmentProto - .internal_static_google_cloud_automl_v1beta1_TextSegment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSegment.class, - com.google.cloud.automl.v1beta1.TextSegment.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextSegment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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_ = ""; - - startOffset_ = 0L; - - endOffset_ = 0L; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextSegmentProto - .internal_static_google_cloud_automl_v1beta1_TextSegment_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSegment getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSegment build() { - com.google.cloud.automl.v1beta1.TextSegment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSegment buildPartial() { - com.google.cloud.automl.v1beta1.TextSegment result = - new com.google.cloud.automl.v1beta1.TextSegment(this); - result.content_ = content_; - result.startOffset_ = startOffset_; - result.endOffset_ = endOffset_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextSegment) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextSegment) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TextSegment other) { - if (other == com.google.cloud.automl.v1beta1.TextSegment.getDefaultInstance()) return this; - if (!other.getContent().isEmpty()) { - content_ = other.content_; - onChanged(); - } - if (other.getStartOffset() != 0L) { - setStartOffset(other.getStartOffset()); - } - if (other.getEndOffset() != 0L) { - setEndOffset(other.getEndOffset()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextSegment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.TextSegment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object content_ = ""; - /** - * - * - *
-     * Output only. The content of the TextSegment.
-     * 
- * - * string content = 3; - * - * @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; - } - } - /** - * - * - *
-     * Output only. The content of the TextSegment.
-     * 
- * - * string content = 3; - * - * @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; - } - } - /** - * - * - *
-     * Output only. The content of the TextSegment.
-     * 
- * - * string content = 3; - * - * @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; - } - /** - * - * - *
-     * Output only. The content of the TextSegment.
-     * 
- * - * string content = 3; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The content of the TextSegment.
-     * 
- * - * string content = 3; - * - * @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 long startOffset_; - /** - * - * - *
-     * Required. Zero-based character index of the first character of the text
-     * segment (counting characters from the beginning of the text).
-     * 
- * - * int64 start_offset = 1; - * - * @return The startOffset. - */ - public long getStartOffset() { - return startOffset_; - } - /** - * - * - *
-     * Required. Zero-based character index of the first character of the text
-     * segment (counting characters from the beginning of the text).
-     * 
- * - * int64 start_offset = 1; - * - * @param value The startOffset to set. - * @return This builder for chaining. - */ - public Builder setStartOffset(long value) { - - startOffset_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Zero-based character index of the first character of the text
-     * segment (counting characters from the beginning of the text).
-     * 
- * - * int64 start_offset = 1; - * - * @return This builder for chaining. - */ - public Builder clearStartOffset() { - - startOffset_ = 0L; - onChanged(); - return this; - } - - private long endOffset_; - /** - * - * - *
-     * Required. Zero-based character index of the first character past the end of
-     * the text segment (counting character from the beginning of the text).
-     * The character at the end_offset is NOT included in the text segment.
-     * 
- * - * int64 end_offset = 2; - * - * @return The endOffset. - */ - public long getEndOffset() { - return endOffset_; - } - /** - * - * - *
-     * Required. Zero-based character index of the first character past the end of
-     * the text segment (counting character from the beginning of the text).
-     * The character at the end_offset is NOT included in the text segment.
-     * 
- * - * int64 end_offset = 2; - * - * @param value The endOffset to set. - * @return This builder for chaining. - */ - public Builder setEndOffset(long value) { - - endOffset_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Zero-based character index of the first character past the end of
-     * the text segment (counting character from the beginning of the text).
-     * The character at the end_offset is NOT included in the text segment.
-     * 
- * - * int64 end_offset = 2; - * - * @return This builder for chaining. - */ - public Builder clearEndOffset() { - - endOffset_ = 0L; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextSegment) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSegment) - private static final com.google.cloud.automl.v1beta1.TextSegment DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextSegment(); - } - - public static com.google.cloud.automl.v1beta1.TextSegment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextSegment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextSegment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSegment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentOrBuilder.java deleted file mode 100644 index b962b39db..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentOrBuilder.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_segment.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextSegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSegment) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The content of the TextSegment.
-   * 
- * - * string content = 3; - * - * @return The content. - */ - java.lang.String getContent(); - /** - * - * - *
-   * Output only. The content of the TextSegment.
-   * 
- * - * string content = 3; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); - - /** - * - * - *
-   * Required. Zero-based character index of the first character of the text
-   * segment (counting characters from the beginning of the text).
-   * 
- * - * int64 start_offset = 1; - * - * @return The startOffset. - */ - long getStartOffset(); - - /** - * - * - *
-   * Required. Zero-based character index of the first character past the end of
-   * the text segment (counting character from the beginning of the text).
-   * The character at the end_offset is NOT included in the text segment.
-   * 
- * - * int64 end_offset = 2; - * - * @return The endOffset. - */ - long getEndOffset(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentProto.java deleted file mode 100644 index 8b48229f9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSegmentProto.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_segment.proto - -package com.google.cloud.automl.v1beta1; - -public final class TextSegmentProto { - private TextSegmentProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextSegment_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextSegment_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n.google/cloud/automl/v1beta1/text_segme" - + "nt.proto\022\033google.cloud.automl.v1beta1\032\034g" - + "oogle/api/annotations.proto\"H\n\013TextSegme" - + "nt\022\017\n\007content\030\003 \001(\t\022\024\n\014start_offset\030\001 \001(" - + "\003\022\022\n\nend_offset\030\002 \001(\003B\267\001\n\037com.google.clo" - + "ud.automl.v1beta1B\020TextSegmentProtoP\001ZAg" - + "oogle.golang.org/genproto/googleapis/clo" - + "ud/automl/v1beta1;automl\312\002\033Google\\Cloud\\" - + "AutoMl\\V1beta1\352\002\036Google::Cloud::AutoML::" - + "V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TextSegment_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TextSegment_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextSegment_descriptor, - new java.lang.String[] { - "Content", "StartOffset", "EndOffset", - }); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadata.java deleted file mode 100644 index c84d477e6..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadata.java +++ /dev/null @@ -1,568 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata for text sentiment.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} - */ -public final class TextSentimentDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) - TextSentimentDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextSentimentDatasetMetadata.newBuilder() to construct. - private TextSentimentDatasetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextSentimentDatasetMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextSentimentDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextSentimentDatasetMetadata( - 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.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder.class); - } - - public static final int SENTIMENT_MAX_FIELD_NUMBER = 1; - private int sentimentMax_; - /** - * - * - *
-   * Required. 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 sentiment_max (inclusive on both ends), and all the values
-   * in the range must be represented in the dataset before a model can be
-   * created.
-   * sentiment_max value must be between 1 and 10 (inclusive).
-   * 
- * - * int32 sentiment_max = 1; - * - * @return The sentimentMax. - */ - 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.automl.v1beta1.TextSentimentDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata other = - (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) 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.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata for text sentiment.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata build() { - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata result = - new com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata(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.automl.v1beta1.TextSentimentDatasetMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata.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.automl.v1beta1.TextSentimentDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sentimentMax_; - /** - * - * - *
-     * Required. 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 sentiment_max (inclusive on both ends), and all the values
-     * in the range must be represented in the dataset before a model can be
-     * created.
-     * sentiment_max value must be between 1 and 10 (inclusive).
-     * 
- * - * int32 sentiment_max = 1; - * - * @return The sentimentMax. - */ - public int getSentimentMax() { - return sentimentMax_; - } - /** - * - * - *
-     * Required. 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 sentiment_max (inclusive on both ends), and all the values
-     * in the range must be represented in the dataset before a model can be
-     * created.
-     * sentiment_max 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; - } - /** - * - * - *
-     * Required. 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 sentiment_max (inclusive on both ends), and all the values
-     * in the range must be represented in the dataset before a model can be
-     * created.
-     * sentiment_max 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.automl.v1beta1.TextSentimentDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextSentimentDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextSentimentDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentDatasetMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadataOrBuilder.java deleted file mode 100644 index e6e98f5c3..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextSentimentDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSentimentDatasetMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. 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 sentiment_max (inclusive on both ends), and all the values
-   * in the range must be represented in the dataset before a model can be
-   * created.
-   * sentiment_max value must be between 1 and 10 (inclusive).
-   * 
- * - * int32 sentiment_max = 1; - * - * @return The sentimentMax. - */ - int getSentimentMax(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadata.java deleted file mode 100644 index 7898d9f11..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadata.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata that is specific to text sentiment.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentModelMetadata} - */ -public final class TextSentimentModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSentimentModelMetadata) - TextSentimentModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextSentimentModelMetadata.newBuilder() to construct. - private TextSentimentModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextSentimentModelMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextSentimentModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextSentimentModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.class, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextSentimentModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata other = - (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Model metadata that is specific to text sentiment.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSentimentModelMetadata) - com.google.cloud.automl.v1beta1.TextSentimentModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.class, - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadata build() { - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata result = - new com.google.cloud.automl.v1beta1.TextSentimentModelMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TextSentimentModelMetadata other) { - if (other == com.google.cloud.automl.v1beta1.TextSentimentModelMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextSentimentModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextSentimentModelMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextSentimentModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSentimentModelMetadata) - private static final com.google.cloud.automl.v1beta1.TextSentimentModelMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextSentimentModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentModelMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextSentimentModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextSentimentModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentModelMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadataOrBuilder.java deleted file mode 100644 index 37e17f5c2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentModelMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextSentimentModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSentimentModelMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentProto.java deleted file mode 100644 index 89c935107..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSentimentProto.java +++ /dev/null @@ -1,2727 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/text_sentiment.proto - -package com.google.cloud.automl.v1beta1; - -public final class TextSentimentProto { - private TextSentimentProto() {} - - 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 interface TextSentimentAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSentimentAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. The sentiment with the semantic, as given to the
-     * [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
-     * for the prediction had been trained.
-     * The sentiment values are between 0 and
-     * Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
-     * with higher value meaning more positive sentiment. They are completely
-     * relative, i.e. 0 means least positive sentiment and sentiment_max means
-     * the most positive from the sentiments present in the train data. Therefore
-     *  e.g. if train data had only negative sentiment, then sentiment_max, would
-     * be still negative (although least negative).
-     * The sentiment shouldn't be confused with "score" or "magnitude"
-     * from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * int32 sentiment = 1; - * - * @return The sentiment. - */ - int getSentiment(); - } - /** - * - * - *
-   * Contains annotation details specific to text sentiment.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentAnnotation} - */ - public static final class TextSentimentAnnotation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSentimentAnnotation) - TextSentimentAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextSentimentAnnotation.newBuilder() to construct. - private TextSentimentAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextSentimentAnnotation() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextSentimentAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextSentimentAnnotation( - 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.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.class, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder - .class); - } - - public static final int SENTIMENT_FIELD_NUMBER = 1; - private int sentiment_; - /** - * - * - *
-     * Output only. The sentiment with the semantic, as given to the
-     * [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
-     * for the prediction had been trained.
-     * The sentiment values are between 0 and
-     * Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
-     * with higher value meaning more positive sentiment. They are completely
-     * relative, i.e. 0 means least positive sentiment and sentiment_max means
-     * the most positive from the sentiments present in the train data. Therefore
-     *  e.g. if train data had only negative sentiment, then sentiment_max, would
-     * be still negative (although least negative).
-     * The sentiment shouldn't be confused with "score" or "magnitude"
-     * from the previous Natural Language Sentiment Analysis API.
-     * 
- * - * int32 sentiment = 1; - * - * @return The sentiment. - */ - 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.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation other = - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) 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.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Contains annotation details specific to text sentiment.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentAnnotation} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSentimentAnnotation) - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.class, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder - .class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation build() { - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - buildPartial() { - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation result = - new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation(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.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation other) { - if (other - == com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - .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.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation parsedMessage = - null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sentiment_; - /** - * - * - *
-       * Output only. The sentiment with the semantic, as given to the
-       * [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
-       * for the prediction had been trained.
-       * The sentiment values are between 0 and
-       * Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
-       * with higher value meaning more positive sentiment. They are completely
-       * relative, i.e. 0 means least positive sentiment and sentiment_max means
-       * the most positive from the sentiments present in the train data. Therefore
-       *  e.g. if train data had only negative sentiment, then sentiment_max, would
-       * be still negative (although least negative).
-       * The sentiment shouldn't be confused with "score" or "magnitude"
-       * from the previous Natural Language Sentiment Analysis API.
-       * 
- * - * int32 sentiment = 1; - * - * @return The sentiment. - */ - public int getSentiment() { - return sentiment_; - } - /** - * - * - *
-       * Output only. The sentiment with the semantic, as given to the
-       * [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
-       * for the prediction had been trained.
-       * The sentiment values are between 0 and
-       * Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
-       * with higher value meaning more positive sentiment. They are completely
-       * relative, i.e. 0 means least positive sentiment and sentiment_max means
-       * the most positive from the sentiments present in the train data. Therefore
-       *  e.g. if train data had only negative sentiment, then sentiment_max, would
-       * be still negative (although least negative).
-       * The sentiment shouldn't be confused with "score" or "magnitude"
-       * from the previous Natural Language Sentiment Analysis API.
-       * 
- * - * int32 sentiment = 1; - * - * @param value The sentiment to set. - * @return This builder for chaining. - */ - public Builder setSentiment(int value) { - - sentiment_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The sentiment with the semantic, as given to the
-       * [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
-       * for the prediction had been trained.
-       * The sentiment values are between 0 and
-       * Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
-       * with higher value meaning more positive sentiment. They are completely
-       * relative, i.e. 0 means least positive sentiment and sentiment_max means
-       * the most positive from the sentiments present in the train data. Therefore
-       *  e.g. if train data had only negative sentiment, then sentiment_max, would
-       * be still negative (although least negative).
-       * The sentiment shouldn't be confused with "score" or "magnitude"
-       * from the previous Natural Language Sentiment Analysis API.
-       * 
- * - * 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.automl.v1beta1.TextSentimentAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSentimentAnnotation) - private static final com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextSentimentAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextSentimentAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface TextSentimentEvaluationMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. Precision.
-     * 
- * - * float precision = 1; - * - * @return The precision. - */ - float getPrecision(); - - /** - * - * - *
-     * Output only. Recall.
-     * 
- * - * float recall = 2; - * - * @return The recall. - */ - float getRecall(); - - /** - * - * - *
-     * Output only. The harmonic mean of recall and precision.
-     * 
- * - * float f1_score = 3; - * - * @return The f1Score. - */ - float getF1Score(); - - /** - * - * - *
-     * Output only. Mean absolute error. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float mean_absolute_error = 4; - * - * @return The meanAbsoluteError. - */ - float getMeanAbsoluteError(); - - /** - * - * - *
-     * Output only. Mean squared error. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float mean_squared_error = 5; - * - * @return The meanSquaredError. - */ - float getMeanSquaredError(); - - /** - * - * - *
-     * Output only. Linear weighted kappa. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float linear_kappa = 6; - * - * @return The linearKappa. - */ - float getLinearKappa(); - - /** - * - * - *
-     * Output only. Quadratic weighted kappa. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float quadratic_kappa = 7; - * - * @return The quadraticKappa. - */ - float getQuadraticKappa(); - - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for the overall model evaluation, not for evaluation of a single
-     * annotation spec.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - * - * @return Whether the confusionMatrix field is set. - */ - boolean hasConfusionMatrix(); - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for the overall model evaluation, not for evaluation of a single
-     * annotation spec.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - * - * @return The confusionMatrix. - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getConfusionMatrix(); - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for the overall model evaluation, not for evaluation of a single
-     * annotation spec.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder - getConfusionMatrixOrBuilder(); - - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @return A list containing the annotationSpecId. - */ - @java.lang.Deprecated - java.util.List getAnnotationSpecIdList(); - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @return The count of annotationSpecId. - */ - @java.lang.Deprecated - int getAnnotationSpecIdCount(); - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - @java.lang.Deprecated - java.lang.String getAnnotationSpecId(int index); - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - @java.lang.Deprecated - com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index); - } - /** - * - * - *
-   * Model evaluation metrics for text sentiment problems.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} - */ - public static final class TextSentimentEvaluationMetrics - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics) - TextSentimentEvaluationMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextSentimentEvaluationMetrics.newBuilder() to construct. - private TextSentimentEvaluationMetrics( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextSentimentEvaluationMetrics() { - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextSentimentEvaluationMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextSentimentEvaluationMetrics( - 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 13: - { - precision_ = input.readFloat(); - break; - } - case 21: - { - recall_ = input.readFloat(); - break; - } - case 29: - { - f1Score_ = input.readFloat(); - break; - } - case 37: - { - meanAbsoluteError_ = input.readFloat(); - break; - } - case 45: - { - meanSquaredError_ = input.readFloat(); - break; - } - case 53: - { - linearKappa_ = input.readFloat(); - break; - } - case 61: - { - quadraticKappa_ = input.readFloat(); - break; - } - case 66: - { - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder - subBuilder = null; - if (confusionMatrix_ != null) { - subBuilder = confusionMatrix_.toBuilder(); - } - confusionMatrix_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(confusionMatrix_); - confusionMatrix_ = subBuilder.buildPartial(); - } - - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - annotationSpecId_.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)) { - annotationSpecId_ = annotationSpecId_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .class, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .Builder.class); - } - - public static final int PRECISION_FIELD_NUMBER = 1; - private float precision_; - /** - * - * - *
-     * Output only. Precision.
-     * 
- * - * float precision = 1; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - - public static final int RECALL_FIELD_NUMBER = 2; - private float recall_; - /** - * - * - *
-     * Output only. Recall.
-     * 
- * - * float recall = 2; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - - public static final int F1_SCORE_FIELD_NUMBER = 3; - private float f1Score_; - /** - * - * - *
-     * Output only. The harmonic mean of recall and precision.
-     * 
- * - * float f1_score = 3; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - - public static final int MEAN_ABSOLUTE_ERROR_FIELD_NUMBER = 4; - private float meanAbsoluteError_; - /** - * - * - *
-     * Output only. Mean absolute error. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float mean_absolute_error = 4; - * - * @return The meanAbsoluteError. - */ - public float getMeanAbsoluteError() { - return meanAbsoluteError_; - } - - public static final int MEAN_SQUARED_ERROR_FIELD_NUMBER = 5; - private float meanSquaredError_; - /** - * - * - *
-     * Output only. Mean squared error. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float mean_squared_error = 5; - * - * @return The meanSquaredError. - */ - public float getMeanSquaredError() { - return meanSquaredError_; - } - - public static final int LINEAR_KAPPA_FIELD_NUMBER = 6; - private float linearKappa_; - /** - * - * - *
-     * Output only. Linear weighted kappa. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float linear_kappa = 6; - * - * @return The linearKappa. - */ - public float getLinearKappa() { - return linearKappa_; - } - - public static final int QUADRATIC_KAPPA_FIELD_NUMBER = 7; - private float quadraticKappa_; - /** - * - * - *
-     * Output only. Quadratic weighted kappa. Only set for the overall model
-     * evaluation, not for evaluation of a single annotation spec.
-     * 
- * - * float quadratic_kappa = 7; - * - * @return The quadraticKappa. - */ - public float getQuadraticKappa() { - return quadraticKappa_; - } - - public static final int CONFUSION_MATRIX_FIELD_NUMBER = 8; - private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - confusionMatrix_; - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for the overall model evaluation, not for evaluation of a single
-     * annotation spec.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - * - * @return Whether the confusionMatrix field is set. - */ - public boolean hasConfusionMatrix() { - return confusionMatrix_ != null; - } - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for the overall model evaluation, not for evaluation of a single
-     * annotation spec.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - * - * @return The confusionMatrix. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getConfusionMatrix() { - return confusionMatrix_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance() - : confusionMatrix_; - } - /** - * - * - *
-     * Output only. Confusion matrix of the evaluation.
-     * Only set for the overall model evaluation, not for evaluation of a single
-     * annotation spec.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder - getConfusionMatrixOrBuilder() { - return getConfusionMatrix(); - } - - public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 9; - private com.google.protobuf.LazyStringList annotationSpecId_; - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @return A list containing the annotationSpecId. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() { - return annotationSpecId_; - } - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @return The count of annotationSpecId. - */ - @java.lang.Deprecated - public int getAnnotationSpecIdCount() { - return annotationSpecId_.size(); - } - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - @java.lang.Deprecated - public java.lang.String getAnnotationSpecId(int index) { - return annotationSpecId_.get(index); - } - /** - * - * - *
-     * Output only. The annotation spec ids used for this evaluation.
-     * Deprecated .
-     * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) { - return annotationSpecId_.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 (precision_ != 0F) { - output.writeFloat(1, precision_); - } - if (recall_ != 0F) { - output.writeFloat(2, recall_); - } - if (f1Score_ != 0F) { - output.writeFloat(3, f1Score_); - } - if (meanAbsoluteError_ != 0F) { - output.writeFloat(4, meanAbsoluteError_); - } - if (meanSquaredError_ != 0F) { - output.writeFloat(5, meanSquaredError_); - } - if (linearKappa_ != 0F) { - output.writeFloat(6, linearKappa_); - } - if (quadraticKappa_ != 0F) { - output.writeFloat(7, quadraticKappa_); - } - if (confusionMatrix_ != null) { - output.writeMessage(8, getConfusionMatrix()); - } - for (int i = 0; i < annotationSpecId_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 9, annotationSpecId_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (precision_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, precision_); - } - if (recall_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, recall_); - } - if (f1Score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, f1Score_); - } - if (meanAbsoluteError_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, meanAbsoluteError_); - } - if (meanSquaredError_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, meanSquaredError_); - } - if (linearKappa_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, linearKappa_); - } - if (quadraticKappa_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, quadraticKappa_); - } - if (confusionMatrix_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getConfusionMatrix()); - } - { - int dataSize = 0; - for (int i = 0; i < annotationSpecId_.size(); i++) { - dataSize += computeStringSizeNoTag(annotationSpecId_.getRaw(i)); - } - size += dataSize; - size += 1 * getAnnotationSpecIdList().size(); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics other = - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) obj; - - if (java.lang.Float.floatToIntBits(getPrecision()) - != java.lang.Float.floatToIntBits(other.getPrecision())) return false; - if (java.lang.Float.floatToIntBits(getRecall()) - != java.lang.Float.floatToIntBits(other.getRecall())) return false; - if (java.lang.Float.floatToIntBits(getF1Score()) - != java.lang.Float.floatToIntBits(other.getF1Score())) return false; - if (java.lang.Float.floatToIntBits(getMeanAbsoluteError()) - != java.lang.Float.floatToIntBits(other.getMeanAbsoluteError())) return false; - if (java.lang.Float.floatToIntBits(getMeanSquaredError()) - != java.lang.Float.floatToIntBits(other.getMeanSquaredError())) return false; - if (java.lang.Float.floatToIntBits(getLinearKappa()) - != java.lang.Float.floatToIntBits(other.getLinearKappa())) return false; - if (java.lang.Float.floatToIntBits(getQuadraticKappa()) - != java.lang.Float.floatToIntBits(other.getQuadraticKappa())) return false; - if (hasConfusionMatrix() != other.hasConfusionMatrix()) return false; - if (hasConfusionMatrix()) { - if (!getConfusionMatrix().equals(other.getConfusionMatrix())) return false; - } - if (!getAnnotationSpecIdList().equals(other.getAnnotationSpecIdList())) return false; - if (!unknownFields.equals(other.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) + PRECISION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getPrecision()); - hash = (37 * hash) + RECALL_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecall()); - hash = (37 * hash) + F1_SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getF1Score()); - hash = (37 * hash) + MEAN_ABSOLUTE_ERROR_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMeanAbsoluteError()); - hash = (37 * hash) + MEAN_SQUARED_ERROR_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getMeanSquaredError()); - hash = (37 * hash) + LINEAR_KAPPA_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getLinearKappa()); - hash = (37 * hash) + QUADRATIC_KAPPA_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getQuadraticKappa()); - if (hasConfusionMatrix()) { - hash = (37 * hash) + CONFUSION_MATRIX_FIELD_NUMBER; - hash = (53 * hash) + getConfusionMatrix().hashCode(); - } - if (getAnnotationSpecIdCount() > 0) { - hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER; - hash = (53 * hash) + getAnnotationSpecIdList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 evaluation metrics for text sentiment problems.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics) - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .class, - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - precision_ = 0F; - - recall_ = 0F; - - f1Score_ = 0F; - - meanAbsoluteError_ = 0F; - - meanSquaredError_ = 0F; - - linearKappa_ = 0F; - - quadraticKappa_ = 0F; - - if (confusionMatrixBuilder_ == null) { - confusionMatrix_ = null; - } else { - confusionMatrix_ = null; - confusionMatrixBuilder_ = null; - } - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TextSentimentProto - .internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - build() { - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - buildPartial() { - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics result = - new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics( - this); - int from_bitField0_ = bitField0_; - result.precision_ = precision_; - result.recall_ = recall_; - result.f1Score_ = f1Score_; - result.meanAbsoluteError_ = meanAbsoluteError_; - result.meanSquaredError_ = meanSquaredError_; - result.linearKappa_ = linearKappa_; - result.quadraticKappa_ = quadraticKappa_; - if (confusionMatrixBuilder_ == null) { - result.confusionMatrix_ = confusionMatrix_; - } else { - result.confusionMatrix_ = confusionMatrixBuilder_.build(); - } - if (((bitField0_ & 0x00000001) != 0)) { - annotationSpecId_ = annotationSpecId_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.annotationSpecId_ = annotationSpecId_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics other) { - if (other - == com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - .getDefaultInstance()) return this; - if (other.getPrecision() != 0F) { - setPrecision(other.getPrecision()); - } - if (other.getRecall() != 0F) { - setRecall(other.getRecall()); - } - if (other.getF1Score() != 0F) { - setF1Score(other.getF1Score()); - } - if (other.getMeanAbsoluteError() != 0F) { - setMeanAbsoluteError(other.getMeanAbsoluteError()); - } - if (other.getMeanSquaredError() != 0F) { - setMeanSquaredError(other.getMeanSquaredError()); - } - if (other.getLinearKappa() != 0F) { - setLinearKappa(other.getLinearKappa()); - } - if (other.getQuadraticKappa() != 0F) { - setQuadraticKappa(other.getQuadraticKappa()); - } - if (other.hasConfusionMatrix()) { - mergeConfusionMatrix(other.getConfusionMatrix()); - } - if (!other.annotationSpecId_.isEmpty()) { - if (annotationSpecId_.isEmpty()) { - annotationSpecId_ = other.annotationSpecId_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.addAll(other.annotationSpecId_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private float precision_; - /** - * - * - *
-       * Output only. Precision.
-       * 
- * - * float precision = 1; - * - * @return The precision. - */ - public float getPrecision() { - return precision_; - } - /** - * - * - *
-       * Output only. Precision.
-       * 
- * - * float precision = 1; - * - * @param value The precision to set. - * @return This builder for chaining. - */ - public Builder setPrecision(float value) { - - precision_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Precision.
-       * 
- * - * float precision = 1; - * - * @return This builder for chaining. - */ - public Builder clearPrecision() { - - precision_ = 0F; - onChanged(); - return this; - } - - private float recall_; - /** - * - * - *
-       * Output only. Recall.
-       * 
- * - * float recall = 2; - * - * @return The recall. - */ - public float getRecall() { - return recall_; - } - /** - * - * - *
-       * Output only. Recall.
-       * 
- * - * float recall = 2; - * - * @param value The recall to set. - * @return This builder for chaining. - */ - public Builder setRecall(float value) { - - recall_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Recall.
-       * 
- * - * float recall = 2; - * - * @return This builder for chaining. - */ - public Builder clearRecall() { - - recall_ = 0F; - onChanged(); - return this; - } - - private float f1Score_; - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 3; - * - * @return The f1Score. - */ - public float getF1Score() { - return f1Score_; - } - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 3; - * - * @param value The f1Score to set. - * @return This builder for chaining. - */ - public Builder setF1Score(float value) { - - f1Score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The harmonic mean of recall and precision.
-       * 
- * - * float f1_score = 3; - * - * @return This builder for chaining. - */ - public Builder clearF1Score() { - - f1Score_ = 0F; - onChanged(); - return this; - } - - private float meanAbsoluteError_; - /** - * - * - *
-       * Output only. Mean absolute error. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float mean_absolute_error = 4; - * - * @return The meanAbsoluteError. - */ - public float getMeanAbsoluteError() { - return meanAbsoluteError_; - } - /** - * - * - *
-       * Output only. Mean absolute error. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float mean_absolute_error = 4; - * - * @param value The meanAbsoluteError to set. - * @return This builder for chaining. - */ - public Builder setMeanAbsoluteError(float value) { - - meanAbsoluteError_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Mean absolute error. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float mean_absolute_error = 4; - * - * @return This builder for chaining. - */ - public Builder clearMeanAbsoluteError() { - - meanAbsoluteError_ = 0F; - onChanged(); - return this; - } - - private float meanSquaredError_; - /** - * - * - *
-       * Output only. Mean squared error. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float mean_squared_error = 5; - * - * @return The meanSquaredError. - */ - public float getMeanSquaredError() { - return meanSquaredError_; - } - /** - * - * - *
-       * Output only. Mean squared error. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float mean_squared_error = 5; - * - * @param value The meanSquaredError to set. - * @return This builder for chaining. - */ - public Builder setMeanSquaredError(float value) { - - meanSquaredError_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Mean squared error. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float mean_squared_error = 5; - * - * @return This builder for chaining. - */ - public Builder clearMeanSquaredError() { - - meanSquaredError_ = 0F; - onChanged(); - return this; - } - - private float linearKappa_; - /** - * - * - *
-       * Output only. Linear weighted kappa. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float linear_kappa = 6; - * - * @return The linearKappa. - */ - public float getLinearKappa() { - return linearKappa_; - } - /** - * - * - *
-       * Output only. Linear weighted kappa. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float linear_kappa = 6; - * - * @param value The linearKappa to set. - * @return This builder for chaining. - */ - public Builder setLinearKappa(float value) { - - linearKappa_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Linear weighted kappa. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float linear_kappa = 6; - * - * @return This builder for chaining. - */ - public Builder clearLinearKappa() { - - linearKappa_ = 0F; - onChanged(); - return this; - } - - private float quadraticKappa_; - /** - * - * - *
-       * Output only. Quadratic weighted kappa. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float quadratic_kappa = 7; - * - * @return The quadraticKappa. - */ - public float getQuadraticKappa() { - return quadraticKappa_; - } - /** - * - * - *
-       * Output only. Quadratic weighted kappa. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float quadratic_kappa = 7; - * - * @param value The quadraticKappa to set. - * @return This builder for chaining. - */ - public Builder setQuadraticKappa(float value) { - - quadraticKappa_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. Quadratic weighted kappa. Only set for the overall model
-       * evaluation, not for evaluation of a single annotation spec.
-       * 
- * - * float quadratic_kappa = 7; - * - * @return This builder for chaining. - */ - public Builder clearQuadraticKappa() { - - quadraticKappa_ = 0F; - onChanged(); - return this; - } - - private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - confusionMatrix_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder> - confusionMatrixBuilder_; - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - * - * @return Whether the confusionMatrix field is set. - */ - public boolean hasConfusionMatrix() { - return confusionMatrixBuilder_ != null || confusionMatrix_ != null; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - * - * @return The confusionMatrix. - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - getConfusionMatrix() { - if (confusionMatrixBuilder_ == null) { - return confusionMatrix_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance() - : confusionMatrix_; - } else { - return confusionMatrixBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - public Builder setConfusionMatrix( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - value) { - if (confusionMatrixBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - confusionMatrix_ = value; - onChanged(); - } else { - confusionMatrixBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - public Builder setConfusionMatrix( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder - builderForValue) { - if (confusionMatrixBuilder_ == null) { - confusionMatrix_ = builderForValue.build(); - onChanged(); - } else { - confusionMatrixBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - public Builder mergeConfusionMatrix( - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix - value) { - if (confusionMatrixBuilder_ == null) { - if (confusionMatrix_ != null) { - confusionMatrix_ = - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.newBuilder(confusionMatrix_) - .mergeFrom(value) - .buildPartial(); - } else { - confusionMatrix_ = value; - } - onChanged(); - } else { - confusionMatrixBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - public Builder clearConfusionMatrix() { - if (confusionMatrixBuilder_ == null) { - confusionMatrix_ = null; - onChanged(); - } else { - confusionMatrix_ = null; - confusionMatrixBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder - getConfusionMatrixBuilder() { - - onChanged(); - return getConfusionMatrixFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder - getConfusionMatrixOrBuilder() { - if (confusionMatrixBuilder_ != null) { - return confusionMatrixBuilder_.getMessageOrBuilder(); - } else { - return confusionMatrix_ == null - ? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.getDefaultInstance() - : confusionMatrix_; - } - } - /** - * - * - *
-       * Output only. Confusion matrix of the evaluation.
-       * Only set for the overall model evaluation, not for evaluation of a single
-       * annotation spec.
-       * 
- * - * - * .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrix.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics - .ConfusionMatrixOrBuilder> - getConfusionMatrixFieldBuilder() { - if (confusionMatrixBuilder_ == null) { - confusionMatrixBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrix.Builder, - com.google.cloud.automl.v1beta1.ClassificationProto - .ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder>( - getConfusionMatrix(), getParentForChildren(), isClean()); - confusionMatrix_ = null; - } - return confusionMatrixBuilder_; - } - - private com.google.protobuf.LazyStringList annotationSpecId_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureAnnotationSpecIdIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(annotationSpecId_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @return A list containing the annotationSpecId. - */ - @java.lang.Deprecated - public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() { - return annotationSpecId_.getUnmodifiableView(); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @return The count of annotationSpecId. - */ - @java.lang.Deprecated - public int getAnnotationSpecIdCount() { - return annotationSpecId_.size(); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param index The index of the element to return. - * @return The annotationSpecId at the given index. - */ - @java.lang.Deprecated - public java.lang.String getAnnotationSpecId(int index) { - return annotationSpecId_.get(index); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param index The index of the value to return. - * @return The bytes of the annotationSpecId at the given index. - */ - @java.lang.Deprecated - public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) { - return annotationSpecId_.getByteString(index); - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param index The index to set the value at. - * @param value The annotationSpecId to set. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder setAnnotationSpecId(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param value The annotationSpecId to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addAnnotationSpecId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param values The annotationSpecId to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addAllAnnotationSpecId(java.lang.Iterable values) { - ensureAnnotationSpecIdIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecId_); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder clearAnnotationSpecId() { - annotationSpecId_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The annotation spec ids used for this evaluation.
-       * Deprecated .
-       * 
- * - * repeated string annotation_spec_id = 9 [deprecated = true]; - * - * @param value The bytes of the annotationSpecId to add. - * @return This builder for chaining. - */ - @java.lang.Deprecated - public Builder addAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureAnnotationSpecIdIsMutable(); - annotationSpecId_.add(value); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics) - private static final com.google.cloud.automl.v1beta1.TextSentimentProto - .TextSentimentEvaluationMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics(); - } - - public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextSentimentEvaluationMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextSentimentEvaluationMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_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/automl/v1beta1/text_senti" - + "ment.proto\022\033google.cloud.automl.v1beta1\032" - + "0google/cloud/automl/v1beta1/classificat" - + "ion.proto\032\034google/api/annotations.proto\"" - + ",\n\027TextSentimentAnnotation\022\021\n\tsentiment\030" - + "\001 \001(\005\"\305\002\n\036TextSentimentEvaluationMetrics" - + "\022\021\n\tprecision\030\001 \001(\002\022\016\n\006recall\030\002 \001(\002\022\020\n\010f" - + "1_score\030\003 \001(\002\022\033\n\023mean_absolute_error\030\004 \001" - + "(\002\022\032\n\022mean_squared_error\030\005 \001(\002\022\024\n\014linear" - + "_kappa\030\006 \001(\002\022\027\n\017quadratic_kappa\030\007 \001(\002\022f\n" - + "\020confusion_matrix\030\010 \001(\0132L.google.cloud.a" - + "utoml.v1beta1.ClassificationEvaluationMe" - + "trics.ConfusionMatrix\022\036\n\022annotation_spec" - + "_id\030\t \003(\tB\002\030\001B\267\001\n\037com.google.cloud.autom" - + "l.v1beta1B\022TextSentimentProtoZAgoogle.go" - + "lang.org/genproto/googleapis/cloud/autom" - + "l/v1beta1;automl\312\002\033Google\\Cloud\\AutoMl\\V" - + "1beta1\352\002\036Google::Cloud::AutoML::V1beta1b" - + "\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor, - new java.lang.String[] { - "Sentiment", - }); - internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor, - new java.lang.String[] { - "Precision", - "Recall", - "F1Score", - "MeanAbsoluteError", - "MeanSquaredError", - "LinearKappa", - "QuadraticKappa", - "ConfusionMatrix", - "AnnotationSpecId", - }); - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippet.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippet.java deleted file mode 100644 index 56caa8ad1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippet.java +++ /dev/null @@ -1,1007 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A representation of a text snippet.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSnippet} - */ -public final class TextSnippet extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSnippet) - TextSnippetOrBuilder { - private static final long serialVersionUID = 0L; - // Use TextSnippet.newBuilder() to construct. - private TextSnippet(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TextSnippet() { - content_ = ""; - mimeType_ = ""; - contentUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TextSnippet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TextSnippet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - content_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - mimeType_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - contentUri_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_TextSnippet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_TextSnippet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSnippet.class, - com.google.cloud.automl.v1beta1.TextSnippet.Builder.class); - } - - public static final int CONTENT_FIELD_NUMBER = 1; - private volatile java.lang.Object content_; - /** - * - * - *
-   * Required. The content of the text snippet as a string. Up to 250000
-   * characters long.
-   * 
- * - * string content = 1; - * - * @return The content. - */ - public java.lang.String getContent() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - content_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The content of the text snippet as a string. Up to 250000
-   * characters long.
-   * 
- * - * string content = 1; - * - * @return The bytes for content. - */ - public com.google.protobuf.ByteString getContentBytes() { - java.lang.Object ref = content_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - content_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MIME_TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object mimeType_; - /** - * - * - *
-   * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-   * values are "text/html" and "text/plain". If left blank, the format is
-   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-   * 
- * - * string mime_type = 2; - * - * @return The mimeType. - */ - public java.lang.String getMimeType() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mimeType_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-   * values are "text/html" and "text/plain". If left blank, the format is
-   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-   * 
- * - * string mime_type = 2; - * - * @return The bytes for mimeType. - */ - public com.google.protobuf.ByteString getMimeTypeBytes() { - java.lang.Object ref = mimeType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - mimeType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CONTENT_URI_FIELD_NUMBER = 4; - private volatile java.lang.Object contentUri_; - /** - * - * - *
-   * Output only. HTTP URI where you can download the content.
-   * 
- * - * string content_uri = 4; - * - * @return The contentUri. - */ - public java.lang.String getContentUri() { - java.lang.Object ref = contentUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - contentUri_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. HTTP URI where you can download the content.
-   * 
- * - * string content_uri = 4; - * - * @return The bytes for contentUri. - */ - public com.google.protobuf.ByteString getContentUriBytes() { - java.lang.Object ref = contentUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - contentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getContentBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_); - } - if (!getMimeTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); - } - if (!getContentUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, contentUri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getContentBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_); - } - if (!getMimeTypeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); - } - if (!getContentUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, contentUri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TextSnippet)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TextSnippet other = - (com.google.cloud.automl.v1beta1.TextSnippet) obj; - - if (!getContent().equals(other.getContent())) return false; - if (!getMimeType().equals(other.getMimeType())) return false; - if (!getContentUri().equals(other.getContentUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getContent().hashCode(); - hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMimeType().hashCode(); - hash = (37 * hash) + CONTENT_URI_FIELD_NUMBER; - hash = (53 * hash) + getContentUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.TextSnippet prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * A representation of a text snippet.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TextSnippet} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSnippet) - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_TextSnippet_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_TextSnippet_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TextSnippet.class, - com.google.cloud.automl.v1beta1.TextSnippet.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TextSnippet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - content_ = ""; - - mimeType_ = ""; - - contentUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataItems - .internal_static_google_cloud_automl_v1beta1_TextSnippet_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSnippet getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSnippet build() { - com.google.cloud.automl.v1beta1.TextSnippet result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSnippet buildPartial() { - com.google.cloud.automl.v1beta1.TextSnippet result = - new com.google.cloud.automl.v1beta1.TextSnippet(this); - result.content_ = content_; - result.mimeType_ = mimeType_; - result.contentUri_ = contentUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TextSnippet) { - return mergeFrom((com.google.cloud.automl.v1beta1.TextSnippet) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TextSnippet other) { - if (other == com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance()) return this; - if (!other.getContent().isEmpty()) { - content_ = other.content_; - onChanged(); - } - if (!other.getMimeType().isEmpty()) { - mimeType_ = other.mimeType_; - onChanged(); - } - if (!other.getContentUri().isEmpty()) { - contentUri_ = other.contentUri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TextSnippet parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.TextSnippet) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object content_ = ""; - /** - * - * - *
-     * Required. The content of the text snippet as a string. Up to 250000
-     * characters long.
-     * 
- * - * string content = 1; - * - * @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; - } - } - /** - * - * - *
-     * Required. The content of the text snippet as a string. Up to 250000
-     * characters long.
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Required. The content of the text snippet as a string. Up to 250000
-     * characters long.
-     * 
- * - * 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; - } - /** - * - * - *
-     * Required. The content of the text snippet as a string. Up to 250000
-     * characters long.
-     * 
- * - * string content = 1; - * - * @return This builder for chaining. - */ - public Builder clearContent() { - - content_ = getDefaultInstance().getContent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The content of the text snippet as a string. Up to 250000
-     * characters long.
-     * 
- * - * string content = 1; - * - * @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_ = ""; - /** - * - * - *
-     * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-     * values are "text/html" and "text/plain". If left blank, the format is
-     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-     * values are "text/html" and "text/plain". If left blank, the format is
-     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-     * 
- * - * 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; - } - } - /** - * - * - *
-     * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-     * values are "text/html" and "text/plain". If left blank, the format is
-     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-     * 
- * - * 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; - } - /** - * - * - *
-     * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-     * values are "text/html" and "text/plain". If left blank, the format is
-     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-     * 
- * - * string mime_type = 2; - * - * @return This builder for chaining. - */ - public Builder clearMimeType() { - - mimeType_ = getDefaultInstance().getMimeType(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-     * values are "text/html" and "text/plain". If left blank, the format is
-     * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-     * 
- * - * 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 contentUri_ = ""; - /** - * - * - *
-     * Output only. HTTP URI where you can download the content.
-     * 
- * - * string content_uri = 4; - * - * @return The contentUri. - */ - public java.lang.String getContentUri() { - java.lang.Object ref = contentUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - contentUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. HTTP URI where you can download the content.
-     * 
- * - * string content_uri = 4; - * - * @return The bytes for contentUri. - */ - public com.google.protobuf.ByteString getContentUriBytes() { - java.lang.Object ref = contentUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - contentUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. HTTP URI where you can download the content.
-     * 
- * - * string content_uri = 4; - * - * @param value The contentUri to set. - * @return This builder for chaining. - */ - public Builder setContentUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - contentUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. HTTP URI where you can download the content.
-     * 
- * - * string content_uri = 4; - * - * @return This builder for chaining. - */ - public Builder clearContentUri() { - - contentUri_ = getDefaultInstance().getContentUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. HTTP URI where you can download the content.
-     * 
- * - * string content_uri = 4; - * - * @param value The bytes for contentUri to set. - * @return This builder for chaining. - */ - public Builder setContentUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - contentUri_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextSnippet) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSnippet) - private static final com.google.cloud.automl.v1beta1.TextSnippet DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TextSnippet(); - } - - public static com.google.cloud.automl.v1beta1.TextSnippet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TextSnippet parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TextSnippet(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TextSnippet getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippetOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippetOrBuilder.java deleted file mode 100644 index 8dfa8873e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TextSnippetOrBuilder.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_items.proto - -package com.google.cloud.automl.v1beta1; - -public interface TextSnippetOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSnippet) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The content of the text snippet as a string. Up to 250000
-   * characters long.
-   * 
- * - * string content = 1; - * - * @return The content. - */ - java.lang.String getContent(); - /** - * - * - *
-   * Required. The content of the text snippet as a string. Up to 250000
-   * characters long.
-   * 
- * - * string content = 1; - * - * @return The bytes for content. - */ - com.google.protobuf.ByteString getContentBytes(); - - /** - * - * - *
-   * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-   * values are "text/html" and "text/plain". If left blank, the format is
-   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-   * 
- * - * string mime_type = 2; - * - * @return The mimeType. - */ - java.lang.String getMimeType(); - /** - * - * - *
-   * Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed
-   * values are "text/html" and "text/plain". If left blank, the format is
-   * automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content].
-   * 
- * - * string mime_type = 2; - * - * @return The bytes for mimeType. - */ - com.google.protobuf.ByteString getMimeTypeBytes(); - - /** - * - * - *
-   * Output only. HTTP URI where you can download the content.
-   * 
- * - * string content_uri = 4; - * - * @return The contentUri. - */ - java.lang.String getContentUri(); - /** - * - * - *
-   * Output only. HTTP URI where you can download the content.
-   * 
- * - * string content_uri = 4; - * - * @return The bytes for contentUri. - */ - com.google.protobuf.ByteString getContentUriBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegment.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegment.java deleted file mode 100644 index 925a1a8ec..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegment.java +++ /dev/null @@ -1,1024 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/temporal.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * A time period inside of an example that has a time dimension (e.g. video).
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TimeSegment} - */ -public final class TimeSegment extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TimeSegment) - TimeSegmentOrBuilder { - private static final long serialVersionUID = 0L; - // Use TimeSegment.newBuilder() to construct. - private TimeSegment(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TimeSegment() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TimeSegment(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TimeSegment( - 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 (startTimeOffset_ != null) { - subBuilder = startTimeOffset_.toBuilder(); - } - startTimeOffset_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTimeOffset_); - startTimeOffset_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (endTimeOffset_ != null) { - subBuilder = endTimeOffset_.toBuilder(); - } - endTimeOffset_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTimeOffset_); - endTimeOffset_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Temporal - .internal_static_google_cloud_automl_v1beta1_TimeSegment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Temporal - .internal_static_google_cloud_automl_v1beta1_TimeSegment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TimeSegment.class, - com.google.cloud.automl.v1beta1.TimeSegment.Builder.class); - } - - public static final int START_TIME_OFFSET_FIELD_NUMBER = 1; - private com.google.protobuf.Duration startTimeOffset_; - /** - * - * - *
-   * Start of the time segment (inclusive), represented as the duration since
-   * the example start.
-   * 
- * - * .google.protobuf.Duration start_time_offset = 1; - * - * @return Whether the startTimeOffset field is set. - */ - public boolean hasStartTimeOffset() { - return startTimeOffset_ != null; - } - /** - * - * - *
-   * Start of the time segment (inclusive), represented as the duration since
-   * the example start.
-   * 
- * - * .google.protobuf.Duration start_time_offset = 1; - * - * @return The startTimeOffset. - */ - public com.google.protobuf.Duration getStartTimeOffset() { - return startTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : startTimeOffset_; - } - /** - * - * - *
-   * Start of the time segment (inclusive), represented as the duration since
-   * the example start.
-   * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - public com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder() { - return getStartTimeOffset(); - } - - public static final int END_TIME_OFFSET_FIELD_NUMBER = 2; - private com.google.protobuf.Duration endTimeOffset_; - /** - * - * - *
-   * End of the time segment (exclusive), represented as the duration since the
-   * example start.
-   * 
- * - * .google.protobuf.Duration end_time_offset = 2; - * - * @return Whether the endTimeOffset field is set. - */ - public boolean hasEndTimeOffset() { - return endTimeOffset_ != null; - } - /** - * - * - *
-   * End of the time segment (exclusive), represented as the duration since the
-   * example start.
-   * 
- * - * .google.protobuf.Duration end_time_offset = 2; - * - * @return The endTimeOffset. - */ - public com.google.protobuf.Duration getEndTimeOffset() { - return endTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : endTimeOffset_; - } - /** - * - * - *
-   * End of the time segment (exclusive), represented as the duration since the
-   * example start.
-   * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - public com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder() { - return getEndTimeOffset(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTimeOffset_ != null) { - output.writeMessage(1, getStartTimeOffset()); - } - if (endTimeOffset_ != null) { - output.writeMessage(2, getEndTimeOffset()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (startTimeOffset_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTimeOffset()); - } - if (endTimeOffset_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTimeOffset()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TimeSegment)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TimeSegment other = - (com.google.cloud.automl.v1beta1.TimeSegment) obj; - - if (hasStartTimeOffset() != other.hasStartTimeOffset()) return false; - if (hasStartTimeOffset()) { - if (!getStartTimeOffset().equals(other.getStartTimeOffset())) return false; - } - if (hasEndTimeOffset() != other.hasEndTimeOffset()) return false; - if (hasEndTimeOffset()) { - if (!getEndTimeOffset().equals(other.getEndTimeOffset())) return false; - } - if (!unknownFields.equals(other.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 (hasStartTimeOffset()) { - hash = (37 * hash) + START_TIME_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + getStartTimeOffset().hashCode(); - } - if (hasEndTimeOffset()) { - hash = (37 * hash) + END_TIME_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + getEndTimeOffset().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.TimeSegment prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 time period inside of an example that has a time dimension (e.g. video).
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TimeSegment} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TimeSegment) - com.google.cloud.automl.v1beta1.TimeSegmentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Temporal - .internal_static_google_cloud_automl_v1beta1_TimeSegment_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Temporal - .internal_static_google_cloud_automl_v1beta1_TimeSegment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TimeSegment.class, - com.google.cloud.automl.v1beta1.TimeSegment.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TimeSegment.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (startTimeOffsetBuilder_ == null) { - startTimeOffset_ = null; - } else { - startTimeOffset_ = null; - startTimeOffsetBuilder_ = null; - } - if (endTimeOffsetBuilder_ == null) { - endTimeOffset_ = null; - } else { - endTimeOffset_ = null; - endTimeOffsetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Temporal - .internal_static_google_cloud_automl_v1beta1_TimeSegment_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimeSegment getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TimeSegment.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimeSegment build() { - com.google.cloud.automl.v1beta1.TimeSegment result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimeSegment buildPartial() { - com.google.cloud.automl.v1beta1.TimeSegment result = - new com.google.cloud.automl.v1beta1.TimeSegment(this); - if (startTimeOffsetBuilder_ == null) { - result.startTimeOffset_ = startTimeOffset_; - } else { - result.startTimeOffset_ = startTimeOffsetBuilder_.build(); - } - if (endTimeOffsetBuilder_ == null) { - result.endTimeOffset_ = endTimeOffset_; - } else { - result.endTimeOffset_ = endTimeOffsetBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TimeSegment) { - return mergeFrom((com.google.cloud.automl.v1beta1.TimeSegment) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TimeSegment other) { - if (other == com.google.cloud.automl.v1beta1.TimeSegment.getDefaultInstance()) return this; - if (other.hasStartTimeOffset()) { - mergeStartTimeOffset(other.getStartTimeOffset()); - } - if (other.hasEndTimeOffset()) { - mergeEndTimeOffset(other.getEndTimeOffset()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TimeSegment parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.TimeSegment) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.protobuf.Duration startTimeOffset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - startTimeOffsetBuilder_; - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - * - * @return Whether the startTimeOffset field is set. - */ - public boolean hasStartTimeOffset() { - return startTimeOffsetBuilder_ != null || startTimeOffset_ != null; - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - * - * @return The startTimeOffset. - */ - public com.google.protobuf.Duration getStartTimeOffset() { - if (startTimeOffsetBuilder_ == null) { - return startTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : startTimeOffset_; - } else { - return startTimeOffsetBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - public Builder setStartTimeOffset(com.google.protobuf.Duration value) { - if (startTimeOffsetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTimeOffset_ = value; - onChanged(); - } else { - startTimeOffsetBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - public Builder setStartTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { - if (startTimeOffsetBuilder_ == null) { - startTimeOffset_ = builderForValue.build(); - onChanged(); - } else { - startTimeOffsetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - public Builder mergeStartTimeOffset(com.google.protobuf.Duration value) { - if (startTimeOffsetBuilder_ == null) { - if (startTimeOffset_ != null) { - startTimeOffset_ = - com.google.protobuf.Duration.newBuilder(startTimeOffset_) - .mergeFrom(value) - .buildPartial(); - } else { - startTimeOffset_ = value; - } - onChanged(); - } else { - startTimeOffsetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - public Builder clearStartTimeOffset() { - if (startTimeOffsetBuilder_ == null) { - startTimeOffset_ = null; - onChanged(); - } else { - startTimeOffset_ = null; - startTimeOffsetBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - public com.google.protobuf.Duration.Builder getStartTimeOffsetBuilder() { - - onChanged(); - return getStartTimeOffsetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - public com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder() { - if (startTimeOffsetBuilder_ != null) { - return startTimeOffsetBuilder_.getMessageOrBuilder(); - } else { - return startTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : startTimeOffset_; - } - } - /** - * - * - *
-     * Start of the time segment (inclusive), represented as the duration since
-     * the example start.
-     * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getStartTimeOffsetFieldBuilder() { - if (startTimeOffsetBuilder_ == null) { - startTimeOffsetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getStartTimeOffset(), getParentForChildren(), isClean()); - startTimeOffset_ = null; - } - return startTimeOffsetBuilder_; - } - - private com.google.protobuf.Duration endTimeOffset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - endTimeOffsetBuilder_; - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - * - * @return Whether the endTimeOffset field is set. - */ - public boolean hasEndTimeOffset() { - return endTimeOffsetBuilder_ != null || endTimeOffset_ != null; - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - * - * @return The endTimeOffset. - */ - public com.google.protobuf.Duration getEndTimeOffset() { - if (endTimeOffsetBuilder_ == null) { - return endTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : endTimeOffset_; - } else { - return endTimeOffsetBuilder_.getMessage(); - } - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - public Builder setEndTimeOffset(com.google.protobuf.Duration value) { - if (endTimeOffsetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTimeOffset_ = value; - onChanged(); - } else { - endTimeOffsetBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - public Builder setEndTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { - if (endTimeOffsetBuilder_ == null) { - endTimeOffset_ = builderForValue.build(); - onChanged(); - } else { - endTimeOffsetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - public Builder mergeEndTimeOffset(com.google.protobuf.Duration value) { - if (endTimeOffsetBuilder_ == null) { - if (endTimeOffset_ != null) { - endTimeOffset_ = - com.google.protobuf.Duration.newBuilder(endTimeOffset_) - .mergeFrom(value) - .buildPartial(); - } else { - endTimeOffset_ = value; - } - onChanged(); - } else { - endTimeOffsetBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - public Builder clearEndTimeOffset() { - if (endTimeOffsetBuilder_ == null) { - endTimeOffset_ = null; - onChanged(); - } else { - endTimeOffset_ = null; - endTimeOffsetBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - public com.google.protobuf.Duration.Builder getEndTimeOffsetBuilder() { - - onChanged(); - return getEndTimeOffsetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - public com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder() { - if (endTimeOffsetBuilder_ != null) { - return endTimeOffsetBuilder_.getMessageOrBuilder(); - } else { - return endTimeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : endTimeOffset_; - } - } - /** - * - * - *
-     * End of the time segment (exclusive), represented as the duration since the
-     * example start.
-     * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder> - getEndTimeOffsetFieldBuilder() { - if (endTimeOffsetBuilder_ == null) { - endTimeOffsetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Duration, - com.google.protobuf.Duration.Builder, - com.google.protobuf.DurationOrBuilder>( - getEndTimeOffset(), getParentForChildren(), isClean()); - endTimeOffset_ = null; - } - return endTimeOffsetBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TimeSegment) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TimeSegment) - private static final com.google.cloud.automl.v1beta1.TimeSegment DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TimeSegment(); - } - - public static com.google.cloud.automl.v1beta1.TimeSegment getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimeSegment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeSegment(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimeSegment getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegmentOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegmentOrBuilder.java deleted file mode 100644 index b174a798a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimeSegmentOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/temporal.proto - -package com.google.cloud.automl.v1beta1; - -public interface TimeSegmentOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TimeSegment) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Start of the time segment (inclusive), represented as the duration since
-   * the example start.
-   * 
- * - * .google.protobuf.Duration start_time_offset = 1; - * - * @return Whether the startTimeOffset field is set. - */ - boolean hasStartTimeOffset(); - /** - * - * - *
-   * Start of the time segment (inclusive), represented as the duration since
-   * the example start.
-   * 
- * - * .google.protobuf.Duration start_time_offset = 1; - * - * @return The startTimeOffset. - */ - com.google.protobuf.Duration getStartTimeOffset(); - /** - * - * - *
-   * Start of the time segment (inclusive), represented as the duration since
-   * the example start.
-   * 
- * - * .google.protobuf.Duration start_time_offset = 1; - */ - com.google.protobuf.DurationOrBuilder getStartTimeOffsetOrBuilder(); - - /** - * - * - *
-   * End of the time segment (exclusive), represented as the duration since the
-   * example start.
-   * 
- * - * .google.protobuf.Duration end_time_offset = 2; - * - * @return Whether the endTimeOffset field is set. - */ - boolean hasEndTimeOffset(); - /** - * - * - *
-   * End of the time segment (exclusive), represented as the duration since the
-   * example start.
-   * 
- * - * .google.protobuf.Duration end_time_offset = 2; - * - * @return The endTimeOffset. - */ - com.google.protobuf.Duration getEndTimeOffset(); - /** - * - * - *
-   * End of the time segment (exclusive), represented as the duration since the
-   * example start.
-   * 
- * - * .google.protobuf.Duration end_time_offset = 2; - */ - com.google.protobuf.DurationOrBuilder getEndTimeOffsetOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStats.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStats.java deleted file mode 100644 index e4dd3197f..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStats.java +++ /dev/null @@ -1,1705 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * The data statistics of a series of TIMESTAMP values.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TimestampStats} - */ -public final class TimestampStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TimestampStats) - TimestampStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use TimestampStats.newBuilder() to construct. - private TimestampStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TimestampStats() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TimestampStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TimestampStats( - 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)) { - granularStats_ = - com.google.protobuf.MapField.newMapField( - GranularStatsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - granularStats__ = - input.readMessage( - GranularStatsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - granularStats_ - .getMutableMap() - .put(granularStats__.getKey(), granularStats__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetGranularStats(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TimestampStats.class, - com.google.cloud.automl.v1beta1.TimestampStats.Builder.class); - } - - public interface GranularStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TimestampStats.GranularStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - int getBucketsCount(); - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - boolean containsBuckets(int key); - /** Use {@link #getBucketsMap()} instead. */ - @java.lang.Deprecated - java.util.Map getBuckets(); - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - java.util.Map getBucketsMap(); - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - long getBucketsOrDefault(int key, long defaultValue); - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - long getBucketsOrThrow(int key); - } - /** - * - * - *
-   * Stats split by a defined in context granularity.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TimestampStats.GranularStats} - */ - public static final class GranularStats extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TimestampStats.GranularStats) - GranularStatsOrBuilder { - private static final long serialVersionUID = 0L; - // Use GranularStats.newBuilder() to construct. - private GranularStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GranularStats() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GranularStats(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GranularStats( - 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)) { - buckets_ = - com.google.protobuf.MapField.newMapField( - BucketsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry buckets__ = - input.readMessage( - BucketsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - buckets_.getMutableMap().put(buckets__.getKey(), buckets__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetBuckets(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats.class, - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats.Builder.class); - } - - public static final int BUCKETS_FIELD_NUMBER = 1; - - private static final class BucketsDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_BucketsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.INT32, - 0, - com.google.protobuf.WireFormat.FieldType.INT64, - 0L); - } - - private com.google.protobuf.MapField buckets_; - - private com.google.protobuf.MapField internalGetBuckets() { - if (buckets_ == null) { - return com.google.protobuf.MapField.emptyMapField(BucketsDefaultEntryHolder.defaultEntry); - } - return buckets_; - } - - public int getBucketsCount() { - return internalGetBuckets().getMap().size(); - } - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - public boolean containsBuckets(int key) { - - return internalGetBuckets().getMap().containsKey(key); - } - /** Use {@link #getBucketsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getBuckets() { - return getBucketsMap(); - } - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - public java.util.Map getBucketsMap() { - return internalGetBuckets().getMap(); - } - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - public long getBucketsOrDefault(int key, long defaultValue) { - - java.util.Map map = internalGetBuckets().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * A map from granularity key to example count for that key.
-     * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-     * 
- * - * map<int32, int64> buckets = 1; - */ - public long getBucketsOrThrow(int key) { - - java.util.Map map = internalGetBuckets().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 { - com.google.protobuf.GeneratedMessageV3.serializeIntegerMapTo( - output, internalGetBuckets(), BucketsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry entry : - internalGetBuckets().getMap().entrySet()) { - com.google.protobuf.MapEntry buckets__ = - BucketsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, buckets__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TimestampStats.GranularStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats other = - (com.google.cloud.automl.v1beta1.TimestampStats.GranularStats) obj; - - if (!internalGetBuckets().equals(other.internalGetBuckets())) return false; - if (!unknownFields.equals(other.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 (!internalGetBuckets().getMap().isEmpty()) { - hash = (37 * hash) + BUCKETS_FIELD_NUMBER; - hash = (53 * hash) + internalGetBuckets().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Stats split by a defined in context granularity.
-     * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TimestampStats.GranularStats} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TimestampStats.GranularStats) - com.google.cloud.automl.v1beta1.TimestampStats.GranularStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetBuckets(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableBuckets(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats.class, - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TimestampStats.GranularStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableBuckets().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TimestampStats.GranularStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats build() { - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats buildPartial() { - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats result = - new com.google.cloud.automl.v1beta1.TimestampStats.GranularStats(this); - int from_bitField0_ = bitField0_; - result.buckets_ = internalGetBuckets(); - result.buckets_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TimestampStats.GranularStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.TimestampStats.GranularStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TimestampStats.GranularStats other) { - if (other - == com.google.cloud.automl.v1beta1.TimestampStats.GranularStats.getDefaultInstance()) - return this; - internalGetMutableBuckets().mergeFrom(other.internalGetBuckets()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TimestampStats.GranularStats) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField buckets_; - - private com.google.protobuf.MapField internalGetBuckets() { - if (buckets_ == null) { - return com.google.protobuf.MapField.emptyMapField(BucketsDefaultEntryHolder.defaultEntry); - } - return buckets_; - } - - private com.google.protobuf.MapField - internalGetMutableBuckets() { - onChanged(); - ; - if (buckets_ == null) { - buckets_ = - com.google.protobuf.MapField.newMapField(BucketsDefaultEntryHolder.defaultEntry); - } - if (!buckets_.isMutable()) { - buckets_ = buckets_.copy(); - } - return buckets_; - } - - public int getBucketsCount() { - return internalGetBuckets().getMap().size(); - } - /** - * - * - *
-       * A map from granularity key to example count for that key.
-       * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-       * 
- * - * map<int32, int64> buckets = 1; - */ - public boolean containsBuckets(int key) { - - return internalGetBuckets().getMap().containsKey(key); - } - /** Use {@link #getBucketsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map getBuckets() { - return getBucketsMap(); - } - /** - * - * - *
-       * A map from granularity key to example count for that key.
-       * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-       * 
- * - * map<int32, int64> buckets = 1; - */ - public java.util.Map getBucketsMap() { - return internalGetBuckets().getMap(); - } - /** - * - * - *
-       * A map from granularity key to example count for that key.
-       * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-       * 
- * - * map<int32, int64> buckets = 1; - */ - public long getBucketsOrDefault(int key, long defaultValue) { - - java.util.Map map = internalGetBuckets().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-       * A map from granularity key to example count for that key.
-       * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-       * 
- * - * map<int32, int64> buckets = 1; - */ - public long getBucketsOrThrow(int key) { - - java.util.Map map = internalGetBuckets().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearBuckets() { - internalGetMutableBuckets().getMutableMap().clear(); - return this; - } - /** - * - * - *
-       * A map from granularity key to example count for that key.
-       * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-       * 
- * - * map<int32, int64> buckets = 1; - */ - public Builder removeBuckets(int key) { - - internalGetMutableBuckets().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableBuckets() { - return internalGetMutableBuckets().getMutableMap(); - } - /** - * - * - *
-       * A map from granularity key to example count for that key.
-       * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-       * 
- * - * map<int32, int64> buckets = 1; - */ - public Builder putBuckets(int key, long value) { - - internalGetMutableBuckets().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-       * A map from granularity key to example count for that key.
-       * E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May).
-       * 
- * - * map<int32, int64> buckets = 1; - */ - public Builder putAllBuckets(java.util.Map values) { - internalGetMutableBuckets().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TimestampStats.GranularStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TimestampStats.GranularStats) - private static final com.google.cloud.automl.v1beta1.TimestampStats.GranularStats - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TimestampStats.GranularStats(); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats.GranularStats - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GranularStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GranularStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int GRANULAR_STATS_FIELD_NUMBER = 1; - - private static final class GranularStatsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_GranularStatsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats - .getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - granularStats_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - internalGetGranularStats() { - if (granularStats_ == null) { - return com.google.protobuf.MapField.emptyMapField( - GranularStatsDefaultEntryHolder.defaultEntry); - } - return granularStats_; - } - - public int getGranularStatsCount() { - return internalGetGranularStats().getMap().size(); - } - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public boolean containsGranularStats(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetGranularStats().getMap().containsKey(key); - } - /** Use {@link #getGranularStatsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - getGranularStats() { - return getGranularStatsMap(); - } - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public java.util.Map< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - getGranularStatsMap() { - return internalGetGranularStats().getMap(); - } - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats getGranularStatsOrDefault( - java.lang.String key, - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map - map = internalGetGranularStats().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats getGranularStatsOrThrow( - java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map - map = internalGetGranularStats().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 { - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetGranularStats(), GranularStatsDefaultEntryHolder.defaultEntry, 1); - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - entry : internalGetGranularStats().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - granularStats__ = - GranularStatsDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, granularStats__); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TimestampStats)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TimestampStats other = - (com.google.cloud.automl.v1beta1.TimestampStats) obj; - - if (!internalGetGranularStats().equals(other.internalGetGranularStats())) return false; - if (!unknownFields.equals(other.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 (!internalGetGranularStats().getMap().isEmpty()) { - hash = (37 * hash) + GRANULAR_STATS_FIELD_NUMBER; - hash = (53 * hash) + internalGetGranularStats().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.TimestampStats prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 data statistics of a series of TIMESTAMP values.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TimestampStats} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TimestampStats) - com.google.cloud.automl.v1beta1.TimestampStatsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 1: - return internalGetGranularStats(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 1: - return internalGetMutableGranularStats(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TimestampStats.class, - com.google.cloud.automl.v1beta1.TimestampStats.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TimestampStats.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - internalGetMutableGranularStats().clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.DataStatsOuterClass - .internal_static_google_cloud_automl_v1beta1_TimestampStats_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats build() { - com.google.cloud.automl.v1beta1.TimestampStats result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats buildPartial() { - com.google.cloud.automl.v1beta1.TimestampStats result = - new com.google.cloud.automl.v1beta1.TimestampStats(this); - int from_bitField0_ = bitField0_; - result.granularStats_ = internalGetGranularStats(); - result.granularStats_.makeImmutable(); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TimestampStats) { - return mergeFrom((com.google.cloud.automl.v1beta1.TimestampStats) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TimestampStats other) { - if (other == com.google.cloud.automl.v1beta1.TimestampStats.getDefaultInstance()) return this; - internalGetMutableGranularStats().mergeFrom(other.internalGetGranularStats()); - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TimestampStats parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.automl.v1beta1.TimestampStats) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - granularStats_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - internalGetGranularStats() { - if (granularStats_ == null) { - return com.google.protobuf.MapField.emptyMapField( - GranularStatsDefaultEntryHolder.defaultEntry); - } - return granularStats_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - internalGetMutableGranularStats() { - onChanged(); - ; - if (granularStats_ == null) { - granularStats_ = - com.google.protobuf.MapField.newMapField(GranularStatsDefaultEntryHolder.defaultEntry); - } - if (!granularStats_.isMutable()) { - granularStats_ = granularStats_.copy(); - } - return granularStats_; - } - - public int getGranularStatsCount() { - return internalGetGranularStats().getMap().size(); - } - /** - * - * - *
-     * The string key is the pre-defined granularity. Currently supported:
-     * hour_of_day, day_of_week, month_of_year.
-     * Granularities finer that the granularity of timestamp data are not
-     * populated (e.g. if timestamps are at day granularity, then hour_of_day
-     * is not populated).
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public boolean containsGranularStats(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - return internalGetGranularStats().getMap().containsKey(key); - } - /** Use {@link #getGranularStatsMap()} instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - getGranularStats() { - return getGranularStatsMap(); - } - /** - * - * - *
-     * The string key is the pre-defined granularity. Currently supported:
-     * hour_of_day, day_of_week, month_of_year.
-     * Granularities finer that the granularity of timestamp data are not
-     * populated (e.g. if timestamps are at day granularity, then hour_of_day
-     * is not populated).
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public java.util.Map< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - getGranularStatsMap() { - return internalGetGranularStats().getMap(); - } - /** - * - * - *
-     * The string key is the pre-defined granularity. Currently supported:
-     * hour_of_day, day_of_week, month_of_year.
-     * Granularities finer that the granularity of timestamp data are not
-     * populated (e.g. if timestamps are at day granularity, then hour_of_day
-     * is not populated).
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats getGranularStatsOrDefault( - java.lang.String key, - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map - map = internalGetGranularStats().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * The string key is the pre-defined granularity. Currently supported:
-     * hour_of_day, day_of_week, month_of_year.
-     * Granularities finer that the granularity of timestamp data are not
-     * populated (e.g. if timestamps are at day granularity, then hour_of_day
-     * is not populated).
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public com.google.cloud.automl.v1beta1.TimestampStats.GranularStats getGranularStatsOrThrow( - java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map - map = internalGetGranularStats().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearGranularStats() { - internalGetMutableGranularStats().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * The string key is the pre-defined granularity. Currently supported:
-     * hour_of_day, day_of_week, month_of_year.
-     * Granularities finer that the granularity of timestamp data are not
-     * populated (e.g. if timestamps are at day granularity, then hour_of_day
-     * is not populated).
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public Builder removeGranularStats(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableGranularStats().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - getMutableGranularStats() { - return internalGetMutableGranularStats().getMutableMap(); - } - /** - * - * - *
-     * The string key is the pre-defined granularity. Currently supported:
-     * hour_of_day, day_of_week, month_of_year.
-     * Granularities finer that the granularity of timestamp data are not
-     * populated (e.g. if timestamps are at day granularity, then hour_of_day
-     * is not populated).
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public Builder putGranularStats( - java.lang.String key, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); - } - internalGetMutableGranularStats().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * The string key is the pre-defined granularity. Currently supported:
-     * hour_of_day, day_of_week, month_of_year.
-     * Granularities finer that the granularity of timestamp data are not
-     * populated (e.g. if timestamps are at day granularity, then hour_of_day
-     * is not populated).
-     * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - public Builder putAllGranularStats( - java.util.Map< - java.lang.String, com.google.cloud.automl.v1beta1.TimestampStats.GranularStats> - values) { - internalGetMutableGranularStats().getMutableMap().putAll(values); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TimestampStats) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TimestampStats) - private static final com.google.cloud.automl.v1beta1.TimestampStats DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TimestampStats(); - } - - public static com.google.cloud.automl.v1beta1.TimestampStats getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TimestampStats parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TimestampStats(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TimestampStats getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStatsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStatsOrBuilder.java deleted file mode 100644 index 2501d2593..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TimestampStatsOrBuilder.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_stats.proto - -package com.google.cloud.automl.v1beta1; - -public interface TimestampStatsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TimestampStats) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - int getGranularStatsCount(); - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - boolean containsGranularStats(java.lang.String key); - /** Use {@link #getGranularStatsMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getGranularStats(); - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - java.util.Map - getGranularStatsMap(); - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats getGranularStatsOrDefault( - java.lang.String key, - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats defaultValue); - /** - * - * - *
-   * The string key is the pre-defined granularity. Currently supported:
-   * hour_of_day, day_of_week, month_of_year.
-   * Granularities finer that the granularity of timestamp data are not
-   * populated (e.g. if timestamps are at day granularity, then hour_of_day
-   * is not populated).
-   * 
- * - * - * map<string, .google.cloud.automl.v1beta1.TimestampStats.GranularStats> granular_stats = 1; - * - */ - com.google.cloud.automl.v1beta1.TimestampStats.GranularStats getGranularStatsOrThrow( - java.lang.String key); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotation.java deleted file mode 100644 index bd9e2285f..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotation.java +++ /dev/null @@ -1,732 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Annotation details specific to translation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationAnnotation} - */ -public final class TranslationAnnotation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TranslationAnnotation) - TranslationAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use TranslationAnnotation.newBuilder() to construct. - private TranslationAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TranslationAnnotation() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TranslationAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TranslationAnnotation( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.automl.v1beta1.TextSnippet.Builder subBuilder = null; - if (translatedContent_ != null) { - subBuilder = translatedContent_.toBuilder(); - } - translatedContent_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TextSnippet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(translatedContent_); - translatedContent_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationAnnotation.class, - com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder.class); - } - - public static final int TRANSLATED_CONTENT_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.TextSnippet translatedContent_; - /** - * - * - *
-   * Output only . The translated content.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - * - * @return Whether the translatedContent field is set. - */ - public boolean hasTranslatedContent() { - return translatedContent_ != null; - } - /** - * - * - *
-   * Output only . The translated content.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - * - * @return The translatedContent. - */ - public com.google.cloud.automl.v1beta1.TextSnippet getTranslatedContent() { - return translatedContent_ == null - ? com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance() - : translatedContent_; - } - /** - * - * - *
-   * Output only . The translated content.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - public com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getTranslatedContentOrBuilder() { - return getTranslatedContent(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (translatedContent_ != null) { - output.writeMessage(1, getTranslatedContent()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (translatedContent_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTranslatedContent()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TranslationAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TranslationAnnotation other = - (com.google.cloud.automl.v1beta1.TranslationAnnotation) obj; - - if (hasTranslatedContent() != other.hasTranslatedContent()) return false; - if (hasTranslatedContent()) { - if (!getTranslatedContent().equals(other.getTranslatedContent())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTranslatedContent()) { - hash = (37 * hash) + TRANSLATED_CONTENT_FIELD_NUMBER; - hash = (53 * hash) + getTranslatedContent().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TranslationAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Annotation details specific to translation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationAnnotation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TranslationAnnotation) - com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationAnnotation.class, - com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TranslationAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (translatedContentBuilder_ == null) { - translatedContent_ = null; - } else { - translatedContent_ = null; - translatedContentBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationAnnotation getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationAnnotation build() { - com.google.cloud.automl.v1beta1.TranslationAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationAnnotation buildPartial() { - com.google.cloud.automl.v1beta1.TranslationAnnotation result = - new com.google.cloud.automl.v1beta1.TranslationAnnotation(this); - if (translatedContentBuilder_ == null) { - result.translatedContent_ = translatedContent_; - } else { - result.translatedContent_ = translatedContentBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TranslationAnnotation) { - return mergeFrom((com.google.cloud.automl.v1beta1.TranslationAnnotation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TranslationAnnotation other) { - if (other == com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance()) - return this; - if (other.hasTranslatedContent()) { - mergeTranslatedContent(other.getTranslatedContent()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TranslationAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TranslationAnnotation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.TextSnippet translatedContent_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder> - translatedContentBuilder_; - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - * - * @return Whether the translatedContent field is set. - */ - public boolean hasTranslatedContent() { - return translatedContentBuilder_ != null || translatedContent_ != null; - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - * - * @return The translatedContent. - */ - public com.google.cloud.automl.v1beta1.TextSnippet getTranslatedContent() { - if (translatedContentBuilder_ == null) { - return translatedContent_ == null - ? com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance() - : translatedContent_; - } else { - return translatedContentBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - public Builder setTranslatedContent(com.google.cloud.automl.v1beta1.TextSnippet value) { - if (translatedContentBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - translatedContent_ = value; - onChanged(); - } else { - translatedContentBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - public Builder setTranslatedContent( - com.google.cloud.automl.v1beta1.TextSnippet.Builder builderForValue) { - if (translatedContentBuilder_ == null) { - translatedContent_ = builderForValue.build(); - onChanged(); - } else { - translatedContentBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - public Builder mergeTranslatedContent(com.google.cloud.automl.v1beta1.TextSnippet value) { - if (translatedContentBuilder_ == null) { - if (translatedContent_ != null) { - translatedContent_ = - com.google.cloud.automl.v1beta1.TextSnippet.newBuilder(translatedContent_) - .mergeFrom(value) - .buildPartial(); - } else { - translatedContent_ = value; - } - onChanged(); - } else { - translatedContentBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - public Builder clearTranslatedContent() { - if (translatedContentBuilder_ == null) { - translatedContent_ = null; - onChanged(); - } else { - translatedContent_ = null; - translatedContentBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - public com.google.cloud.automl.v1beta1.TextSnippet.Builder getTranslatedContentBuilder() { - - onChanged(); - return getTranslatedContentFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - public com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getTranslatedContentOrBuilder() { - if (translatedContentBuilder_ != null) { - return translatedContentBuilder_.getMessageOrBuilder(); - } else { - return translatedContent_ == null - ? com.google.cloud.automl.v1beta1.TextSnippet.getDefaultInstance() - : translatedContent_; - } - } - /** - * - * - *
-     * Output only . The translated content.
-     * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder> - getTranslatedContentFieldBuilder() { - if (translatedContentBuilder_ == null) { - translatedContentBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TextSnippet, - com.google.cloud.automl.v1beta1.TextSnippet.Builder, - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder>( - getTranslatedContent(), getParentForChildren(), isClean()); - translatedContent_ = null; - } - return translatedContentBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TranslationAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TranslationAnnotation) - private static final com.google.cloud.automl.v1beta1.TranslationAnnotation DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TranslationAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.TranslationAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TranslationAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslationAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotationOrBuilder.java deleted file mode 100644 index e983c0245..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationAnnotationOrBuilder.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -public interface TranslationAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TranslationAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only . The translated content.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - * - * @return Whether the translatedContent field is set. - */ - boolean hasTranslatedContent(); - /** - * - * - *
-   * Output only . The translated content.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - * - * @return The translatedContent. - */ - com.google.cloud.automl.v1beta1.TextSnippet getTranslatedContent(); - /** - * - * - *
-   * Output only . The translated content.
-   * 
- * - * .google.cloud.automl.v1beta1.TextSnippet translated_content = 1; - */ - com.google.cloud.automl.v1beta1.TextSnippetOrBuilder getTranslatedContentOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadata.java deleted file mode 100644 index eb27ec188..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadata.java +++ /dev/null @@ -1,812 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata that is specific to translation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationDatasetMetadata} - */ -public final class TranslationDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TranslationDatasetMetadata) - TranslationDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TranslationDatasetMetadata.newBuilder() to construct. - private TranslationDatasetMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TranslationDatasetMetadata() { - sourceLanguageCode_ = ""; - targetLanguageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TranslationDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TranslationDatasetMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceLanguageCode_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetLanguageCode_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder.class); - } - - public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 1; - private volatile java.lang.Object sourceLanguageCode_; - /** - * - * - *
-   * Required. The BCP-47 language code of the source language.
-   * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The sourceLanguageCode. - */ - public java.lang.String getSourceLanguageCode() { - java.lang.Object ref = sourceLanguageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceLanguageCode_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The BCP-47 language code of the source language.
-   * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for sourceLanguageCode. - */ - public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { - java.lang.Object ref = sourceLanguageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object targetLanguageCode_; - /** - * - * - *
-   * Required. The BCP-47 language code of the target language.
-   * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetLanguageCode. - */ - public java.lang.String getTargetLanguageCode() { - java.lang.Object ref = targetLanguageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetLanguageCode_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The BCP-47 language code of the target language.
-   * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetLanguageCode. - */ - public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { - java.lang.Object ref = targetLanguageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getSourceLanguageCodeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceLanguageCode_); - } - if (!getTargetLanguageCodeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetLanguageCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getSourceLanguageCodeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceLanguageCode_); - } - if (!getTargetLanguageCodeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetLanguageCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TranslationDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata other = - (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) obj; - - if (!getSourceLanguageCode().equals(other.getSourceLanguageCode())) return false; - if (!getTargetLanguageCode().equals(other.getTargetLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SOURCE_LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getSourceLanguageCode().hashCode(); - hash = (37 * hash) + TARGET_LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getTargetLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata that is specific to translation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TranslationDatasetMetadata) - com.google.cloud.automl.v1beta1.TranslationDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - sourceLanguageCode_ = ""; - - targetLanguageCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadata build() { - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata result = - new com.google.cloud.automl.v1beta1.TranslationDatasetMetadata(this); - result.sourceLanguageCode_ = sourceLanguageCode_; - result.targetLanguageCode_ = targetLanguageCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TranslationDatasetMetadata other) { - if (other == com.google.cloud.automl.v1beta1.TranslationDatasetMetadata.getDefaultInstance()) - return this; - if (!other.getSourceLanguageCode().isEmpty()) { - sourceLanguageCode_ = other.sourceLanguageCode_; - onChanged(); - } - if (!other.getTargetLanguageCode().isEmpty()) { - targetLanguageCode_ = other.targetLanguageCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TranslationDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TranslationDatasetMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object sourceLanguageCode_ = ""; - /** - * - * - *
-     * Required. The BCP-47 language code of the source language.
-     * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The sourceLanguageCode. - */ - public java.lang.String getSourceLanguageCode() { - java.lang.Object ref = sourceLanguageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceLanguageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The BCP-47 language code of the source language.
-     * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for sourceLanguageCode. - */ - public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { - java.lang.Object ref = sourceLanguageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The BCP-47 language code of the source language.
-     * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The sourceLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setSourceLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceLanguageCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BCP-47 language code of the source language.
-     * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearSourceLanguageCode() { - - sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BCP-47 language code of the source language.
-     * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for sourceLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceLanguageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object targetLanguageCode_ = ""; - /** - * - * - *
-     * Required. The BCP-47 language code of the target language.
-     * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetLanguageCode. - */ - public java.lang.String getTargetLanguageCode() { - java.lang.Object ref = targetLanguageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetLanguageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The BCP-47 language code of the target language.
-     * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetLanguageCode. - */ - public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { - java.lang.Object ref = targetLanguageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The BCP-47 language code of the target language.
-     * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The targetLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setTargetLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetLanguageCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BCP-47 language code of the target language.
-     * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTargetLanguageCode() { - - targetLanguageCode_ = getDefaultInstance().getTargetLanguageCode(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The BCP-47 language code of the target language.
-     * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for targetLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetLanguageCode_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TranslationDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TranslationDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.TranslationDatasetMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TranslationDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TranslationDatasetMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TranslationDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslationDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationDatasetMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadataOrBuilder.java deleted file mode 100644 index edbdb4c32..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -public interface TranslationDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TranslationDatasetMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The BCP-47 language code of the source language.
-   * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The sourceLanguageCode. - */ - java.lang.String getSourceLanguageCode(); - /** - * - * - *
-   * Required. The BCP-47 language code of the source language.
-   * 
- * - * string source_language_code = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for sourceLanguageCode. - */ - com.google.protobuf.ByteString getSourceLanguageCodeBytes(); - - /** - * - * - *
-   * Required. The BCP-47 language code of the target language.
-   * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The targetLanguageCode. - */ - java.lang.String getTargetLanguageCode(); - /** - * - * - *
-   * Required. The BCP-47 language code of the target language.
-   * 
- * - * string target_language_code = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for targetLanguageCode. - */ - com.google.protobuf.ByteString getTargetLanguageCodeBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetrics.java deleted file mode 100644 index 7caa47acc..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetrics.java +++ /dev/null @@ -1,644 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Evaluation metrics for the dataset.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationEvaluationMetrics} - */ -public final class TranslationEvaluationMetrics extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TranslationEvaluationMetrics) - TranslationEvaluationMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use TranslationEvaluationMetrics.newBuilder() to construct. - private TranslationEvaluationMetrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TranslationEvaluationMetrics() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TranslationEvaluationMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TranslationEvaluationMetrics( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: - { - bleuScore_ = input.readDouble(); - break; - } - case 17: - { - baseBleuScore_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder.class); - } - - public static final int BLEU_SCORE_FIELD_NUMBER = 1; - private double bleuScore_; - /** - * - * - *
-   * Output only. BLEU score.
-   * 
- * - * double bleu_score = 1; - * - * @return The bleuScore. - */ - public double getBleuScore() { - return bleuScore_; - } - - public static final int BASE_BLEU_SCORE_FIELD_NUMBER = 2; - private double baseBleuScore_; - /** - * - * - *
-   * Output only. BLEU score for base model.
-   * 
- * - * double base_bleu_score = 2; - * - * @return The baseBleuScore. - */ - public double getBaseBleuScore() { - return baseBleuScore_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (bleuScore_ != 0D) { - output.writeDouble(1, bleuScore_); - } - if (baseBleuScore_ != 0D) { - output.writeDouble(2, baseBleuScore_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (bleuScore_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, bleuScore_); - } - if (baseBleuScore_ != 0D) { - size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, baseBleuScore_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics other = - (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) obj; - - if (java.lang.Double.doubleToLongBits(getBleuScore()) - != java.lang.Double.doubleToLongBits(other.getBleuScore())) return false; - if (java.lang.Double.doubleToLongBits(getBaseBleuScore()) - != java.lang.Double.doubleToLongBits(other.getBaseBleuScore())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BLEU_SCORE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getBleuScore())); - hash = (37 * hash) + BASE_BLEU_SCORE_FIELD_NUMBER; - hash = - (53 * hash) - + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getBaseBleuScore())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Evaluation metrics for the dataset.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationEvaluationMetrics} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TranslationEvaluationMetrics) - com.google.cloud.automl.v1beta1.TranslationEvaluationMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bleuScore_ = 0D; - - baseBleuScore_ = 0D; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics build() { - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics buildPartial() { - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics result = - new com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics(this); - result.bleuScore_ = bleuScore_; - result.baseBleuScore_ = baseBleuScore_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) { - return mergeFrom((com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics other) { - if (other - == com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics.getDefaultInstance()) - return this; - if (other.getBleuScore() != 0D) { - setBleuScore(other.getBleuScore()); - } - if (other.getBaseBleuScore() != 0D) { - setBaseBleuScore(other.getBaseBleuScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double bleuScore_; - /** - * - * - *
-     * Output only. BLEU score.
-     * 
- * - * double bleu_score = 1; - * - * @return The bleuScore. - */ - public double getBleuScore() { - return bleuScore_; - } - /** - * - * - *
-     * Output only. BLEU score.
-     * 
- * - * double bleu_score = 1; - * - * @param value The bleuScore to set. - * @return This builder for chaining. - */ - public Builder setBleuScore(double value) { - - bleuScore_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. BLEU score.
-     * 
- * - * double bleu_score = 1; - * - * @return This builder for chaining. - */ - public Builder clearBleuScore() { - - bleuScore_ = 0D; - onChanged(); - return this; - } - - private double baseBleuScore_; - /** - * - * - *
-     * Output only. BLEU score for base model.
-     * 
- * - * double base_bleu_score = 2; - * - * @return The baseBleuScore. - */ - public double getBaseBleuScore() { - return baseBleuScore_; - } - /** - * - * - *
-     * Output only. BLEU score for base model.
-     * 
- * - * double base_bleu_score = 2; - * - * @param value The baseBleuScore to set. - * @return This builder for chaining. - */ - public Builder setBaseBleuScore(double value) { - - baseBleuScore_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. BLEU score for base model.
-     * 
- * - * double base_bleu_score = 2; - * - * @return This builder for chaining. - */ - public Builder clearBaseBleuScore() { - - baseBleuScore_ = 0D; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TranslationEvaluationMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TranslationEvaluationMetrics) - private static final com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics(); - } - - public static com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TranslationEvaluationMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslationEvaluationMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationEvaluationMetrics getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetricsOrBuilder.java deleted file mode 100644 index f673fe07e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationEvaluationMetricsOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -public interface TranslationEvaluationMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TranslationEvaluationMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. BLEU score.
-   * 
- * - * double bleu_score = 1; - * - * @return The bleuScore. - */ - double getBleuScore(); - - /** - * - * - *
-   * Output only. BLEU score for base model.
-   * 
- * - * double base_bleu_score = 2; - * - * @return The baseBleuScore. - */ - double getBaseBleuScore(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadata.java deleted file mode 100644 index 2f555b3e0..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadata.java +++ /dev/null @@ -1,1024 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata that is specific to translation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationModelMetadata} - */ -public final class TranslationModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TranslationModelMetadata) - TranslationModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use TranslationModelMetadata.newBuilder() to construct. - private TranslationModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private TranslationModelMetadata() { - baseModel_ = ""; - sourceLanguageCode_ = ""; - targetLanguageCode_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new TranslationModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TranslationModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - baseModel_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - sourceLanguageCode_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetLanguageCode_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationModelMetadata.class, - com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder.class); - } - - public static final int BASE_MODEL_FIELD_NUMBER = 1; - private volatile java.lang.Object baseModel_; - /** - * - * - *
-   * The resource name of the model to use as a baseline to train the custom
-   * model. If unset, we use the default base model provided by Google
-   * Translate. Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string base_model = 1; - * - * @return The baseModel. - */ - public java.lang.String getBaseModel() { - java.lang.Object ref = baseModel_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseModel_ = s; - return s; - } - } - /** - * - * - *
-   * The resource name of the model to use as a baseline to train the custom
-   * model. If unset, we use the default base model provided by Google
-   * Translate. Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string base_model = 1; - * - * @return The bytes for baseModel. - */ - public com.google.protobuf.ByteString getBaseModelBytes() { - java.lang.Object ref = baseModel_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - baseModel_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER = 2; - private volatile java.lang.Object sourceLanguageCode_; - /** - * - * - *
-   * Output only. Inferred from the dataset.
-   * The source languge (The BCP-47 language code) that is used for training.
-   * 
- * - * string source_language_code = 2; - * - * @return The sourceLanguageCode. - */ - public java.lang.String getSourceLanguageCode() { - java.lang.Object ref = sourceLanguageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceLanguageCode_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Inferred from the dataset.
-   * The source languge (The BCP-47 language code) that is used for training.
-   * 
- * - * string source_language_code = 2; - * - * @return The bytes for sourceLanguageCode. - */ - public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { - java.lang.Object ref = sourceLanguageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER = 3; - private volatile java.lang.Object targetLanguageCode_; - /** - * - * - *
-   * Output only. The target languge (The BCP-47 language code) that is used for
-   * training.
-   * 
- * - * string target_language_code = 3; - * - * @return The targetLanguageCode. - */ - public java.lang.String getTargetLanguageCode() { - java.lang.Object ref = targetLanguageCode_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetLanguageCode_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The target languge (The BCP-47 language code) that is used for
-   * training.
-   * 
- * - * string target_language_code = 3; - * - * @return The bytes for targetLanguageCode. - */ - public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { - java.lang.Object ref = targetLanguageCode_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getBaseModelBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, baseModel_); - } - if (!getSourceLanguageCodeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceLanguageCode_); - } - if (!getTargetLanguageCodeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, targetLanguageCode_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getBaseModelBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, baseModel_); - } - if (!getSourceLanguageCodeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceLanguageCode_); - } - if (!getTargetLanguageCodeBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, targetLanguageCode_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.TranslationModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.TranslationModelMetadata other = - (com.google.cloud.automl.v1beta1.TranslationModelMetadata) obj; - - if (!getBaseModel().equals(other.getBaseModel())) return false; - if (!getSourceLanguageCode().equals(other.getSourceLanguageCode())) return false; - if (!getTargetLanguageCode().equals(other.getTargetLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + BASE_MODEL_FIELD_NUMBER; - hash = (53 * hash) + getBaseModel().hashCode(); - hash = (37 * hash) + SOURCE_LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getSourceLanguageCode().hashCode(); - hash = (37 * hash) + TARGET_LANGUAGE_CODE_FIELD_NUMBER; - hash = (53 * hash) + getTargetLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.TranslationModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Model metadata that is specific to translation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.TranslationModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TranslationModelMetadata) - com.google.cloud.automl.v1beta1.TranslationModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.TranslationModelMetadata.class, - com.google.cloud.automl.v1beta1.TranslationModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.TranslationModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - baseModel_ = ""; - - sourceLanguageCode_ = ""; - - targetLanguageCode_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.TranslationProto - .internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationModelMetadata getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationModelMetadata build() { - com.google.cloud.automl.v1beta1.TranslationModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.TranslationModelMetadata result = - new com.google.cloud.automl.v1beta1.TranslationModelMetadata(this); - result.baseModel_ = baseModel_; - result.sourceLanguageCode_ = sourceLanguageCode_; - result.targetLanguageCode_ = targetLanguageCode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.TranslationModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.TranslationModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.TranslationModelMetadata other) { - if (other == com.google.cloud.automl.v1beta1.TranslationModelMetadata.getDefaultInstance()) - return this; - if (!other.getBaseModel().isEmpty()) { - baseModel_ = other.baseModel_; - onChanged(); - } - if (!other.getSourceLanguageCode().isEmpty()) { - sourceLanguageCode_ = other.sourceLanguageCode_; - onChanged(); - } - if (!other.getTargetLanguageCode().isEmpty()) { - targetLanguageCode_ = other.targetLanguageCode_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.TranslationModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.TranslationModelMetadata) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object baseModel_ = ""; - /** - * - * - *
-     * The resource name of the model to use as a baseline to train the custom
-     * model. If unset, we use the default base model provided by Google
-     * Translate. Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string base_model = 1; - * - * @return The baseModel. - */ - public java.lang.String getBaseModel() { - java.lang.Object ref = baseModel_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - baseModel_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The resource name of the model to use as a baseline to train the custom
-     * model. If unset, we use the default base model provided by Google
-     * Translate. Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string base_model = 1; - * - * @return The bytes for baseModel. - */ - public com.google.protobuf.ByteString getBaseModelBytes() { - java.lang.Object ref = baseModel_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - baseModel_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The resource name of the model to use as a baseline to train the custom
-     * model. If unset, we use the default base model provided by Google
-     * Translate. Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string base_model = 1; - * - * @param value The baseModel to set. - * @return This builder for chaining. - */ - public Builder setBaseModel(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - baseModel_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The resource name of the model to use as a baseline to train the custom
-     * model. If unset, we use the default base model provided by Google
-     * Translate. Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string base_model = 1; - * - * @return This builder for chaining. - */ - public Builder clearBaseModel() { - - baseModel_ = getDefaultInstance().getBaseModel(); - onChanged(); - return this; - } - /** - * - * - *
-     * The resource name of the model to use as a baseline to train the custom
-     * model. If unset, we use the default base model provided by Google
-     * Translate. Format:
-     * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-     * 
- * - * string base_model = 1; - * - * @param value The bytes for baseModel to set. - * @return This builder for chaining. - */ - public Builder setBaseModelBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - baseModel_ = value; - onChanged(); - return this; - } - - private java.lang.Object sourceLanguageCode_ = ""; - /** - * - * - *
-     * Output only. Inferred from the dataset.
-     * The source languge (The BCP-47 language code) that is used for training.
-     * 
- * - * string source_language_code = 2; - * - * @return The sourceLanguageCode. - */ - public java.lang.String getSourceLanguageCode() { - java.lang.Object ref = sourceLanguageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - sourceLanguageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Inferred from the dataset.
-     * The source languge (The BCP-47 language code) that is used for training.
-     * 
- * - * string source_language_code = 2; - * - * @return The bytes for sourceLanguageCode. - */ - public com.google.protobuf.ByteString getSourceLanguageCodeBytes() { - java.lang.Object ref = sourceLanguageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - sourceLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Inferred from the dataset.
-     * The source languge (The BCP-47 language code) that is used for training.
-     * 
- * - * string source_language_code = 2; - * - * @param value The sourceLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setSourceLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - sourceLanguageCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Inferred from the dataset.
-     * The source languge (The BCP-47 language code) that is used for training.
-     * 
- * - * string source_language_code = 2; - * - * @return This builder for chaining. - */ - public Builder clearSourceLanguageCode() { - - sourceLanguageCode_ = getDefaultInstance().getSourceLanguageCode(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Inferred from the dataset.
-     * The source languge (The BCP-47 language code) that is used for training.
-     * 
- * - * string source_language_code = 2; - * - * @param value The bytes for sourceLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - sourceLanguageCode_ = value; - onChanged(); - return this; - } - - private java.lang.Object targetLanguageCode_ = ""; - /** - * - * - *
-     * Output only. The target languge (The BCP-47 language code) that is used for
-     * training.
-     * 
- * - * string target_language_code = 3; - * - * @return The targetLanguageCode. - */ - public java.lang.String getTargetLanguageCode() { - java.lang.Object ref = targetLanguageCode_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - targetLanguageCode_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The target languge (The BCP-47 language code) that is used for
-     * training.
-     * 
- * - * string target_language_code = 3; - * - * @return The bytes for targetLanguageCode. - */ - public com.google.protobuf.ByteString getTargetLanguageCodeBytes() { - java.lang.Object ref = targetLanguageCode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - targetLanguageCode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The target languge (The BCP-47 language code) that is used for
-     * training.
-     * 
- * - * string target_language_code = 3; - * - * @param value The targetLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setTargetLanguageCode(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - targetLanguageCode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The target languge (The BCP-47 language code) that is used for
-     * training.
-     * 
- * - * string target_language_code = 3; - * - * @return This builder for chaining. - */ - public Builder clearTargetLanguageCode() { - - targetLanguageCode_ = getDefaultInstance().getTargetLanguageCode(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The target languge (The BCP-47 language code) that is used for
-     * training.
-     * 
- * - * string target_language_code = 3; - * - * @param value The bytes for targetLanguageCode to set. - * @return This builder for chaining. - */ - public Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - targetLanguageCode_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TranslationModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TranslationModelMetadata) - private static final com.google.cloud.automl.v1beta1.TranslationModelMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.TranslationModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.TranslationModelMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public TranslationModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new TranslationModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.TranslationModelMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadataOrBuilder.java deleted file mode 100644 index 177d6ac4c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationModelMetadataOrBuilder.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -public interface TranslationModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TranslationModelMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The resource name of the model to use as a baseline to train the custom
-   * model. If unset, we use the default base model provided by Google
-   * Translate. Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string base_model = 1; - * - * @return The baseModel. - */ - java.lang.String getBaseModel(); - /** - * - * - *
-   * The resource name of the model to use as a baseline to train the custom
-   * model. If unset, we use the default base model provided by Google
-   * Translate. Format:
-   * `projects/{project_id}/locations/{location_id}/models/{model_id}`
-   * 
- * - * string base_model = 1; - * - * @return The bytes for baseModel. - */ - com.google.protobuf.ByteString getBaseModelBytes(); - - /** - * - * - *
-   * Output only. Inferred from the dataset.
-   * The source languge (The BCP-47 language code) that is used for training.
-   * 
- * - * string source_language_code = 2; - * - * @return The sourceLanguageCode. - */ - java.lang.String getSourceLanguageCode(); - /** - * - * - *
-   * Output only. Inferred from the dataset.
-   * The source languge (The BCP-47 language code) that is used for training.
-   * 
- * - * string source_language_code = 2; - * - * @return The bytes for sourceLanguageCode. - */ - com.google.protobuf.ByteString getSourceLanguageCodeBytes(); - - /** - * - * - *
-   * Output only. The target languge (The BCP-47 language code) that is used for
-   * training.
-   * 
- * - * string target_language_code = 3; - * - * @return The targetLanguageCode. - */ - java.lang.String getTargetLanguageCode(); - /** - * - * - *
-   * Output only. The target languge (The BCP-47 language code) that is used for
-   * training.
-   * 
- * - * string target_language_code = 3; - * - * @return The bytes for targetLanguageCode. - */ - com.google.protobuf.ByteString getTargetLanguageCodeBytes(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationProto.java deleted file mode 100644 index d31470471..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TranslationProto.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/translation.proto - -package com.google.cloud.automl.v1beta1; - -public final class TranslationProto { - private TranslationProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n-google/cloud/automl/v1beta1/translatio" - + "n.proto\022\033google.cloud.automl.v1beta1\032\037go" - + "ogle/api/field_behavior.proto\032,google/cl" - + "oud/automl/v1beta1/data_items.proto\032\034goo" - + "gle/api/annotations.proto\"b\n\032Translation" - + "DatasetMetadata\022!\n\024source_language_code\030" - + "\001 \001(\tB\003\340A\002\022!\n\024target_language_code\030\002 \001(\t" - + "B\003\340A\002\"K\n\034TranslationEvaluationMetrics\022\022\n" - + "\nbleu_score\030\001 \001(\001\022\027\n\017base_bleu_score\030\002 \001" - + "(\001\"j\n\030TranslationModelMetadata\022\022\n\nbase_m" - + "odel\030\001 \001(\t\022\034\n\024source_language_code\030\002 \001(\t" - + "\022\034\n\024target_language_code\030\003 \001(\t\"]\n\025Transl" - + "ationAnnotation\022D\n\022translated_content\030\001 " - + "\001(\0132(.google.cloud.automl.v1beta1.TextSn" - + "ippetB\267\001\n\037com.google.cloud.automl.v1beta" - + "1B\020TranslationProtoP\001ZAgoogle.golang.org" - + "/genproto/googleapis/cloud/automl/v1beta" - + "1;automl\312\002\033Google\\Cloud\\AutoMl\\V1beta1\352\002" - + "\036Google::Cloud::AutoML::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.cloud.automl.v1beta1.DataItems.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TranslationDatasetMetadata_descriptor, - new java.lang.String[] { - "SourceLanguageCode", "TargetLanguageCode", - }); - internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TranslationEvaluationMetrics_descriptor, - new java.lang.String[] { - "BleuScore", "BaseBleuScore", - }); - internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TranslationModelMetadata_descriptor, - new java.lang.String[] { - "BaseModel", "SourceLanguageCode", "TargetLanguageCode", - }); - internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_TranslationAnnotation_descriptor, - new java.lang.String[] { - "TranslatedContent", - }); - 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.automl.v1beta1.DataItems.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TypeCode.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TypeCode.java deleted file mode 100644 index acefa7669..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TypeCode.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/data_types.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * `TypeCode` is used as a part of
- * [DataType][google.cloud.automl.v1beta1.DataType].
- * 
- * - * Protobuf enum {@code google.cloud.automl.v1beta1.TypeCode} - */ -public enum TypeCode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-   * Not specified. Should not be used.
-   * 
- * - * TYPE_CODE_UNSPECIFIED = 0; - */ - TYPE_CODE_UNSPECIFIED(0), - /** - * - * - *
-   * Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
-   * `"-Infinity"`.
-   * 
- * - * FLOAT64 = 3; - */ - FLOAT64(3), - /** - * - * - *
-   * Must be between 0AD and 9999AD. Encoded as `string` according to
-   * [time_format][google.cloud.automl.v1beta1.DataType.time_format], or, if
-   * that format is not set, then in RFC 3339 `date-time` format, where
-   * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z).
-   * 
- * - * TIMESTAMP = 4; - */ - TIMESTAMP(4), - /** - * - * - *
-   * Encoded as `string`.
-   * 
- * - * STRING = 6; - */ - STRING(6), - /** - * - * - *
-   * Encoded as `list`, where the list elements are represented according to
-   * [list_element_type][google.cloud.automl.v1beta1.DataType.list_element_type].
-   * 
- * - * ARRAY = 8; - */ - ARRAY(8), - /** - * - * - *
-   * Encoded as `struct`, where field values are represented according to
-   * [struct_type][google.cloud.automl.v1beta1.DataType.struct_type].
-   * 
- * - * STRUCT = 9; - */ - STRUCT(9), - /** - * - * - *
-   * Values of this type are not further understood by AutoML,
-   * e.g. AutoML is unable to tell the order of values (as it could with
-   * FLOAT64), or is unable to say if one value contains another (as it
-   * could with STRING).
-   * Encoded as `string` (bytes should be base64-encoded, as described in RFC
-   * 4648, section 4).
-   * 
- * - * CATEGORY = 10; - */ - CATEGORY(10), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-   * Not specified. Should not be used.
-   * 
- * - * TYPE_CODE_UNSPECIFIED = 0; - */ - public static final int TYPE_CODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-   * Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or
-   * `"-Infinity"`.
-   * 
- * - * FLOAT64 = 3; - */ - public static final int FLOAT64_VALUE = 3; - /** - * - * - *
-   * Must be between 0AD and 9999AD. Encoded as `string` according to
-   * [time_format][google.cloud.automl.v1beta1.DataType.time_format], or, if
-   * that format is not set, then in RFC 3339 `date-time` format, where
-   * `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z).
-   * 
- * - * TIMESTAMP = 4; - */ - public static final int TIMESTAMP_VALUE = 4; - /** - * - * - *
-   * Encoded as `string`.
-   * 
- * - * STRING = 6; - */ - public static final int STRING_VALUE = 6; - /** - * - * - *
-   * Encoded as `list`, where the list elements are represented according to
-   * [list_element_type][google.cloud.automl.v1beta1.DataType.list_element_type].
-   * 
- * - * ARRAY = 8; - */ - public static final int ARRAY_VALUE = 8; - /** - * - * - *
-   * Encoded as `struct`, where field values are represented according to
-   * [struct_type][google.cloud.automl.v1beta1.DataType.struct_type].
-   * 
- * - * STRUCT = 9; - */ - public static final int STRUCT_VALUE = 9; - /** - * - * - *
-   * Values of this type are not further understood by AutoML,
-   * e.g. AutoML is unable to tell the order of values (as it could with
-   * FLOAT64), or is unable to say if one value contains another (as it
-   * could with STRING).
-   * Encoded as `string` (bytes should be base64-encoded, as described in RFC
-   * 4648, section 4).
-   * 
- * - * CATEGORY = 10; - */ - public static final int CATEGORY_VALUE = 10; - - 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 TypeCode 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 TypeCode forNumber(int value) { - switch (value) { - case 0: - return TYPE_CODE_UNSPECIFIED; - case 3: - return FLOAT64; - case 4: - return TIMESTAMP; - case 6: - return STRING; - case 8: - return ARRAY; - case 9: - return STRUCT; - case 10: - return CATEGORY; - 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 TypeCode findValueByNumber(int number) { - return TypeCode.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.DataTypes.getDescriptor().getEnumTypes().get(0); - } - - private static final TypeCode[] VALUES = values(); - - public static TypeCode 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 TypeCode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.automl.v1beta1.TypeCode) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadata.java deleted file mode 100644 index 8996eab89..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadata.java +++ /dev/null @@ -1,464 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Details of UndeployModel operation.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UndeployModelOperationMetadata} - */ -public final class UndeployModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata other = - (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelOperationMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelOperationMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelOperationMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelOperationMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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; - } - /** - * - * - *
-   * Details of UndeployModel operation.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UndeployModelOperationMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.UndeployModelOperationMetadata) - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.class, - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Operations - .internal_static_google_cloud_automl_v1beta1_UndeployModelOperationMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata build() { - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata buildPartial() { - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata result = - new com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.UndeployModelOperationMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.UndeployModelOperationMetadata) - private static final com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.UndeployModelOperationMetadata(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelOperationMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadataOrBuilder.java deleted file mode 100644 index 0f421fce9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelOperationMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/operations.proto - -package com.google.cloud.automl.v1beta1; - -public interface UndeployModelOperationMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.UndeployModelOperationMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequest.java deleted file mode 100644 index 231e48187..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequest.java +++ /dev/null @@ -1,648 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel].
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UndeployModelRequest} - */ -public final class UndeployModelRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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() { - name_ = ""; - } - - @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(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UndeployModelRequest.class, - com.google.cloud.automl.v1beta1.UndeployModelRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Resource name of the model to undeploy.
-   * 
- * - * - * 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) { - 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. Resource name of the model to undeploy.
-   * 
- * - * - * 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 java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.UndeployModelRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.UndeployModelRequest other = - (com.google.cloud.automl.v1beta1.UndeployModelRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.UndeployModelRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UndeployModelRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UndeployModelRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.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 [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel].
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UndeployModelRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.UndeployModelRequest) - com.google.cloud.automl.v1beta1.UndeployModelRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UndeployModelRequest.class, - com.google.cloud.automl.v1beta1.UndeployModelRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.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(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UndeployModelRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UndeployModelRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.UndeployModelRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UndeployModelRequest build() { - com.google.cloud.automl.v1beta1.UndeployModelRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UndeployModelRequest buildPartial() { - com.google.cloud.automl.v1beta1.UndeployModelRequest result = - new com.google.cloud.automl.v1beta1.UndeployModelRequest(this); - result.name_ = name_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.UndeployModelRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.UndeployModelRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.UndeployModelRequest other) { - if (other == com.google.cloud.automl.v1beta1.UndeployModelRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.UndeployModelRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.UndeployModelRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Resource name of the model to undeploy.
-     * 
- * - * - * 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. Resource name of the model to undeploy.
-     * 
- * - * - * 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. Resource name of the model to undeploy.
-     * 
- * - * - * 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. Resource name of the model to undeploy.
-     * 
- * - * - * 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. Resource name of the model to undeploy.
-     * 
- * - * - * 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.automl.v1beta1.UndeployModelRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.UndeployModelRequest) - private static final com.google.cloud.automl.v1beta1.UndeployModelRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.UndeployModelRequest(); - } - - public static com.google.cloud.automl.v1beta1.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.automl.v1beta1.UndeployModelRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequestOrBuilder.java deleted file mode 100644 index 6ae823272..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UndeployModelRequestOrBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface UndeployModelRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.UndeployModelRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Resource name of the model to undeploy.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Resource name of the model to undeploy.
-   * 
- * - * - * 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-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequest.java deleted file mode 100644 index ce7feca69..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequest.java +++ /dev/null @@ -1,1025 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec]
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UpdateColumnSpecRequest} - */ -public final class UpdateColumnSpecRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.UpdateColumnSpecRequest) - UpdateColumnSpecRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateColumnSpecRequest.newBuilder() to construct. - private UpdateColumnSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateColumnSpecRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateColumnSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateColumnSpecRequest( - 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.automl.v1beta1.ColumnSpec.Builder subBuilder = null; - if (columnSpec_ != null) { - subBuilder = columnSpec_.toBuilder(); - } - columnSpec_ = - input.readMessage( - com.google.cloud.automl.v1beta1.ColumnSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(columnSpec_); - columnSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.class, - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.Builder.class); - } - - public static final int COLUMN_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.ColumnSpec columnSpec_; - /** - * - * - *
-   * Required. The column spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the columnSpec field is set. - */ - public boolean hasColumnSpec() { - return columnSpec_ != null; - } - /** - * - * - *
-   * Required. The column spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The columnSpec. - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getColumnSpec() { - return columnSpec_ == null - ? com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance() - : columnSpec_; - } - /** - * - * - *
-   * Required. The column spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getColumnSpecOrBuilder() { - return getColumnSpec(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (columnSpec_ != null) { - output.writeMessage(1, getColumnSpec()); - } - 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 (columnSpec_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getColumnSpec()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest other = - (com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest) obj; - - if (hasColumnSpec() != other.hasColumnSpec()) return false; - if (hasColumnSpec()) { - if (!getColumnSpec().equals(other.getColumnSpec())) 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 (hasColumnSpec()) { - hash = (37 * hash) + COLUMN_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getColumnSpec().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec]
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UpdateColumnSpecRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.UpdateColumnSpecRequest) - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.class, - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (columnSpecBuilder_ == null) { - columnSpec_ = null; - } else { - columnSpec_ = null; - columnSpecBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateColumnSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest build() { - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest buildPartial() { - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest result = - new com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest(this); - if (columnSpecBuilder_ == null) { - result.columnSpec_ = columnSpec_; - } else { - result.columnSpec_ = columnSpecBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest other) { - if (other == com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest.getDefaultInstance()) - return this; - if (other.hasColumnSpec()) { - mergeColumnSpec(other.getColumnSpec()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.ColumnSpec columnSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - columnSpecBuilder_; - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the columnSpec field is set. - */ - public boolean hasColumnSpec() { - return columnSpecBuilder_ != null || columnSpec_ != null; - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The columnSpec. - */ - public com.google.cloud.automl.v1beta1.ColumnSpec getColumnSpec() { - if (columnSpecBuilder_ == null) { - return columnSpec_ == null - ? com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance() - : columnSpec_; - } else { - return columnSpecBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setColumnSpec(com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (columnSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - columnSpec_ = value; - onChanged(); - } else { - columnSpecBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setColumnSpec( - com.google.cloud.automl.v1beta1.ColumnSpec.Builder builderForValue) { - if (columnSpecBuilder_ == null) { - columnSpec_ = builderForValue.build(); - onChanged(); - } else { - columnSpecBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeColumnSpec(com.google.cloud.automl.v1beta1.ColumnSpec value) { - if (columnSpecBuilder_ == null) { - if (columnSpec_ != null) { - columnSpec_ = - com.google.cloud.automl.v1beta1.ColumnSpec.newBuilder(columnSpec_) - .mergeFrom(value) - .buildPartial(); - } else { - columnSpec_ = value; - } - onChanged(); - } else { - columnSpecBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearColumnSpec() { - if (columnSpecBuilder_ == null) { - columnSpec_ = null; - onChanged(); - } else { - columnSpec_ = null; - columnSpecBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpec.Builder getColumnSpecBuilder() { - - onChanged(); - return getColumnSpecFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getColumnSpecOrBuilder() { - if (columnSpecBuilder_ != null) { - return columnSpecBuilder_.getMessageOrBuilder(); - } else { - return columnSpec_ == null - ? com.google.cloud.automl.v1beta1.ColumnSpec.getDefaultInstance() - : columnSpec_; - } - } - /** - * - * - *
-     * Required. The column spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder> - getColumnSpecFieldBuilder() { - if (columnSpecBuilder_ == null) { - columnSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.ColumnSpec, - com.google.cloud.automl.v1beta1.ColumnSpec.Builder, - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder>( - getColumnSpec(), getParentForChildren(), isClean()); - columnSpec_ = null; - } - return columnSpecBuilder_; - } - - 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_; - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @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(); - } - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.UpdateColumnSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.UpdateColumnSpecRequest) - private static final com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest(); - } - - public static com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateColumnSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateColumnSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateColumnSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequestOrBuilder.java deleted file mode 100644 index 1b174356b..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateColumnSpecRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface UpdateColumnSpecRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.UpdateColumnSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The column spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the columnSpec field is set. - */ - boolean hasColumnSpec(); - /** - * - * - *
-   * Required. The column spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The columnSpec. - */ - com.google.cloud.automl.v1beta1.ColumnSpec getColumnSpec(); - /** - * - * - *
-   * Required. The column spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.ColumnSpec column_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.ColumnSpecOrBuilder getColumnSpecOrBuilder(); - - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequest.java deleted file mode 100644 index df62c3a29..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequest.java +++ /dev/null @@ -1,1023 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset]
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UpdateDatasetRequest} - */ -public final class UpdateDatasetRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset.Builder subBuilder = null; - if (dataset_ != null) { - subBuilder = dataset_.toBuilder(); - } - dataset_ = - input.readMessage( - com.google.cloud.automl.v1beta1.Dataset.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataset_); - dataset_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UpdateDatasetRequest.class, - com.google.cloud.automl.v1beta1.UpdateDatasetRequest.Builder.class); - } - - public static final int DATASET_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.Dataset dataset_; - /** - * - * - *
-   * Required. The dataset which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the dataset field is set. - */ - public boolean hasDataset() { - return dataset_ != null; - } - /** - * - * - *
-   * Required. The dataset which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataset. - */ - public com.google.cloud.automl.v1beta1.Dataset getDataset() { - return dataset_ == null - ? com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance() - : dataset_; - } - /** - * - * - *
-   * Required. The dataset which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetOrBuilder() { - return getDataset(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (dataset_ != null) { - output.writeMessage(1, getDataset()); - } - if (updateMask_ != null) { - output.writeMessage(2, getUpdateMask()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (dataset_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDataset()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.UpdateDatasetRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.UpdateDatasetRequest other = - (com.google.cloud.automl.v1beta1.UpdateDatasetRequest) obj; - - if (hasDataset() != other.hasDataset()) return false; - if (hasDataset()) { - if (!getDataset().equals(other.getDataset())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasDataset()) { - hash = (37 * hash) + DATASET_FIELD_NUMBER; - hash = (53 * hash) + getDataset().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.automl.v1beta1.UpdateDatasetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset]
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UpdateDatasetRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.UpdateDatasetRequest) - com.google.cloud.automl.v1beta1.UpdateDatasetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UpdateDatasetRequest.class, - com.google.cloud.automl.v1beta1.UpdateDatasetRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.UpdateDatasetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (datasetBuilder_ == null) { - dataset_ = null; - } else { - dataset_ = null; - datasetBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateDatasetRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateDatasetRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.UpdateDatasetRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateDatasetRequest build() { - com.google.cloud.automl.v1beta1.UpdateDatasetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateDatasetRequest buildPartial() { - com.google.cloud.automl.v1beta1.UpdateDatasetRequest result = - new com.google.cloud.automl.v1beta1.UpdateDatasetRequest(this); - if (datasetBuilder_ == null) { - result.dataset_ = dataset_; - } else { - result.dataset_ = datasetBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.UpdateDatasetRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.UpdateDatasetRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.UpdateDatasetRequest other) { - if (other == com.google.cloud.automl.v1beta1.UpdateDatasetRequest.getDefaultInstance()) - return this; - if (other.hasDataset()) { - mergeDataset(other.getDataset()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.UpdateDatasetRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.UpdateDatasetRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.Dataset dataset_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder> - datasetBuilder_; - /** - * - * - *
-     * Required. The dataset which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataset. - */ - public com.google.cloud.automl.v1beta1.Dataset getDataset() { - if (datasetBuilder_ == null) { - return dataset_ == null - ? com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance() - : dataset_; - } else { - return datasetBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The dataset which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataset(com.google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDataset(com.google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDataset(com.google.cloud.automl.v1beta1.Dataset value) { - if (datasetBuilder_ == null) { - if (dataset_ != null) { - dataset_ = - com.google.cloud.automl.v1beta1.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.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.Dataset.Builder getDatasetBuilder() { - - onChanged(); - return getDatasetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The dataset which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetOrBuilder() { - if (datasetBuilder_ != null) { - return datasetBuilder_.getMessageOrBuilder(); - } else { - return dataset_ == null - ? com.google.cloud.automl.v1beta1.Dataset.getDefaultInstance() - : dataset_; - } - } - /** - * - * - *
-     * Required. The dataset which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.DatasetOrBuilder> - getDatasetFieldBuilder() { - if (datasetBuilder_ == null) { - datasetBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.Dataset, - com.google.cloud.automl.v1beta1.Dataset.Builder, - com.google.cloud.automl.v1beta1.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_; - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @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(); - } - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.UpdateDatasetRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.UpdateDatasetRequest) - private static final com.google.cloud.automl.v1beta1.UpdateDatasetRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.UpdateDatasetRequest(); - } - - public static com.google.cloud.automl.v1beta1.UpdateDatasetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateDatasetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateDatasetRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateDatasetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequestOrBuilder.java deleted file mode 100644 index 9919af6b5..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateDatasetRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface UpdateDatasetRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.UpdateDatasetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The dataset which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.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.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The dataset. - */ - com.google.cloud.automl.v1beta1.Dataset getDataset(); - /** - * - * - *
-   * Required. The dataset which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.Dataset dataset = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.DatasetOrBuilder getDatasetOrBuilder(); - - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequest.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequest.java deleted file mode 100644 index 1d190a333..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequest.java +++ /dev/null @@ -1,1024 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec]
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UpdateTableSpecRequest} - */ -public final class UpdateTableSpecRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.UpdateTableSpecRequest) - UpdateTableSpecRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateTableSpecRequest.newBuilder() to construct. - private UpdateTableSpecRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateTableSpecRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateTableSpecRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private UpdateTableSpecRequest( - 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.automl.v1beta1.TableSpec.Builder subBuilder = null; - if (tableSpec_ != null) { - subBuilder = tableSpec_.toBuilder(); - } - tableSpec_ = - input.readMessage( - com.google.cloud.automl.v1beta1.TableSpec.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tableSpec_); - tableSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.class, - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.Builder.class); - } - - public static final int TABLE_SPEC_FIELD_NUMBER = 1; - private com.google.cloud.automl.v1beta1.TableSpec tableSpec_; - /** - * - * - *
-   * Required. The table spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the tableSpec field is set. - */ - public boolean hasTableSpec() { - return tableSpec_ != null; - } - /** - * - * - *
-   * Required. The table spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The tableSpec. - */ - public com.google.cloud.automl.v1beta1.TableSpec getTableSpec() { - return tableSpec_ == null - ? com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance() - : tableSpec_; - } - /** - * - * - *
-   * Required. The table spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.TableSpecOrBuilder getTableSpecOrBuilder() { - return getTableSpec(); - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 2; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMask_ != null; - } - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return getUpdateMask(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (tableSpec_ != null) { - output.writeMessage(1, getTableSpec()); - } - 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 (tableSpec_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTableSpec()); - } - if (updateMask_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.UpdateTableSpecRequest)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest other = - (com.google.cloud.automl.v1beta1.UpdateTableSpecRequest) obj; - - if (hasTableSpec() != other.hasTableSpec()) return false; - if (hasTableSpec()) { - if (!getTableSpec().equals(other.getTableSpec())) 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 (hasTableSpec()) { - hash = (37 * hash) + TABLE_SPEC_FIELD_NUMBER; - hash = (53 * hash) + getTableSpec().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec]
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.UpdateTableSpecRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.UpdateTableSpecRequest) - com.google.cloud.automl.v1beta1.UpdateTableSpecRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.class, - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.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 (tableSpecBuilder_ == null) { - tableSpec_ = null; - } else { - tableSpec_ = null; - tableSpecBuilder_ = null; - } - if (updateMaskBuilder_ == null) { - updateMask_ = null; - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.AutoMlProto - .internal_static_google_cloud_automl_v1beta1_UpdateTableSpecRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateTableSpecRequest getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateTableSpecRequest build() { - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateTableSpecRequest buildPartial() { - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest result = - new com.google.cloud.automl.v1beta1.UpdateTableSpecRequest(this); - if (tableSpecBuilder_ == null) { - result.tableSpec_ = tableSpec_; - } else { - result.tableSpec_ = tableSpecBuilder_.build(); - } - if (updateMaskBuilder_ == null) { - result.updateMask_ = updateMask_; - } else { - result.updateMask_ = updateMaskBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.UpdateTableSpecRequest) { - return mergeFrom((com.google.cloud.automl.v1beta1.UpdateTableSpecRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.UpdateTableSpecRequest other) { - if (other == com.google.cloud.automl.v1beta1.UpdateTableSpecRequest.getDefaultInstance()) - return this; - if (other.hasTableSpec()) { - mergeTableSpec(other.getTableSpec()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.UpdateTableSpecRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.UpdateTableSpecRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.cloud.automl.v1beta1.TableSpec tableSpec_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TableSpec, - com.google.cloud.automl.v1beta1.TableSpec.Builder, - com.google.cloud.automl.v1beta1.TableSpecOrBuilder> - tableSpecBuilder_; - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the tableSpec field is set. - */ - public boolean hasTableSpec() { - return tableSpecBuilder_ != null || tableSpec_ != null; - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The tableSpec. - */ - public com.google.cloud.automl.v1beta1.TableSpec getTableSpec() { - if (tableSpecBuilder_ == null) { - return tableSpec_ == null - ? com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance() - : tableSpec_; - } else { - return tableSpecBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTableSpec(com.google.cloud.automl.v1beta1.TableSpec value) { - if (tableSpecBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - tableSpec_ = value; - onChanged(); - } else { - tableSpecBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setTableSpec(com.google.cloud.automl.v1beta1.TableSpec.Builder builderForValue) { - if (tableSpecBuilder_ == null) { - tableSpec_ = builderForValue.build(); - onChanged(); - } else { - tableSpecBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeTableSpec(com.google.cloud.automl.v1beta1.TableSpec value) { - if (tableSpecBuilder_ == null) { - if (tableSpec_ != null) { - tableSpec_ = - com.google.cloud.automl.v1beta1.TableSpec.newBuilder(tableSpec_) - .mergeFrom(value) - .buildPartial(); - } else { - tableSpec_ = value; - } - onChanged(); - } else { - tableSpecBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearTableSpec() { - if (tableSpecBuilder_ == null) { - tableSpec_ = null; - onChanged(); - } else { - tableSpec_ = null; - tableSpecBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.TableSpec.Builder getTableSpecBuilder() { - - onChanged(); - return getTableSpecFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.automl.v1beta1.TableSpecOrBuilder getTableSpecOrBuilder() { - if (tableSpecBuilder_ != null) { - return tableSpecBuilder_.getMessageOrBuilder(); - } else { - return tableSpec_ == null - ? com.google.cloud.automl.v1beta1.TableSpec.getDefaultInstance() - : tableSpec_; - } - } - /** - * - * - *
-     * Required. The table spec which replaces the resource on the server.
-     * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TableSpec, - com.google.cloud.automl.v1beta1.TableSpec.Builder, - com.google.cloud.automl.v1beta1.TableSpecOrBuilder> - getTableSpecFieldBuilder() { - if (tableSpecBuilder_ == null) { - tableSpecBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.TableSpec, - com.google.cloud.automl.v1beta1.TableSpec.Builder, - com.google.cloud.automl.v1beta1.TableSpecOrBuilder>( - getTableSpec(), getParentForChildren(), isClean()); - tableSpec_ = null; - } - return tableSpecBuilder_; - } - - 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_; - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return updateMaskBuilder_ != null || updateMask_ != null; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @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(); - } - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - onChanged(); - } else { - updateMaskBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - onChanged(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (updateMask_ != null) { - updateMask_ = - com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); - } else { - updateMask_ = value; - } - onChanged(); - } else { - updateMaskBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public Builder clearUpdateMask() { - if (updateMaskBuilder_ == null) { - updateMask_ = null; - onChanged(); - } else { - updateMask_ = null; - updateMaskBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * The update mask applies to the resource.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.UpdateTableSpecRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.UpdateTableSpecRequest) - private static final com.google.cloud.automl.v1beta1.UpdateTableSpecRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.UpdateTableSpecRequest(); - } - - public static com.google.cloud.automl.v1beta1.UpdateTableSpecRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateTableSpecRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateTableSpecRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.UpdateTableSpecRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequestOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequestOrBuilder.java deleted file mode 100644 index bd28582e1..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/UpdateTableSpecRequestOrBuilder.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/service.proto - -package com.google.cloud.automl.v1beta1; - -public interface UpdateTableSpecRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.UpdateTableSpecRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The table spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the tableSpec field is set. - */ - boolean hasTableSpec(); - /** - * - * - *
-   * Required. The table spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The tableSpec. - */ - com.google.cloud.automl.v1beta1.TableSpec getTableSpec(); - /** - * - * - *
-   * Required. The table spec which replaces the resource on the server.
-   * 
- * - * - * .google.cloud.automl.v1beta1.TableSpec table_spec = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.automl.v1beta1.TableSpecOrBuilder getTableSpecOrBuilder(); - - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * The update mask applies to the resource.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 2; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadata.java deleted file mode 100644 index c238cd3c4..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadata.java +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata specific to video classification.
- * All Video Classification datasets are treated as multi label.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} - */ -public final class VideoClassificationDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - VideoClassificationDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use VideoClassificationDatasetMetadata.newBuilder() to construct. - private VideoClassificationDatasetMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VideoClassificationDatasetMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VideoClassificationDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VideoClassificationDatasetMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata other = - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata specific to video classification.
-   * All Video Classification datasets are treated as multi label.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.class, - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata build() { - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata result = - new com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoClassificationDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VideoClassificationDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadataOrBuilder.java deleted file mode 100644 index 61778ba6a..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -public interface VideoClassificationDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.VideoClassificationDatasetMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadata.java deleted file mode 100644 index 07955ce65..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadata.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata specific to video classification.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoClassificationModelMetadata} - */ -public final class VideoClassificationModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - VideoClassificationModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use VideoClassificationModelMetadata.newBuilder() to construct. - private VideoClassificationModelMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VideoClassificationModelMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VideoClassificationModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VideoClassificationModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.class, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata other = - (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 video classification.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoClassificationModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.class, - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata build() { - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata result = - new com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - private static final com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoClassificationModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VideoClassificationModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoClassificationModelMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadataOrBuilder.java deleted file mode 100644 index 7de1b00d2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoClassificationModelMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -public interface VideoClassificationModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.VideoClassificationModelMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotation.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotation.java deleted file mode 100644 index f18b477fe..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotation.java +++ /dev/null @@ -1,1354 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Annotation details for video object tracking.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} - */ -public final class VideoObjectTrackingAnnotation extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) - VideoObjectTrackingAnnotationOrBuilder { - private static final long serialVersionUID = 0L; - // Use VideoObjectTrackingAnnotation.newBuilder() to construct. - private VideoObjectTrackingAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VideoObjectTrackingAnnotation() { - instanceId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VideoObjectTrackingAnnotation(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VideoObjectTrackingAnnotation( - 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(); - - instanceId_ = s; - break; - } - case 18: - { - 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 26: - { - com.google.cloud.automl.v1beta1.BoundingPoly.Builder subBuilder = null; - if (boundingBox_ != null) { - subBuilder = boundingBox_.toBuilder(); - } - boundingBox_ = - input.readMessage( - com.google.cloud.automl.v1beta1.BoundingPoly.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boundingBox_); - boundingBox_ = subBuilder.buildPartial(); - } - - break; - } - case 37: - { - score_ = 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.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder.class); - } - - public static final int INSTANCE_ID_FIELD_NUMBER = 1; - private volatile java.lang.Object instanceId_; - /** - * - * - *
-   * Optional. The instance of the object, expressed as a positive integer. Used to tell
-   * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-   * present on a single example.
-   * NOTE: Instance ID prediction quality is not a part of model evaluation and
-   * is done as best effort. Especially in cases when an entity goes
-   * off-screen for a longer time (minutes), when it comes back it may be given
-   * a new instance ID.
-   * 
- * - * string instance_id = 1; - * - * @return The instanceId. - */ - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The instance of the object, expressed as a positive integer. Used to tell
-   * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-   * present on a single example.
-   * NOTE: Instance ID prediction quality is not a part of model evaluation and
-   * is done as best effort. Especially in cases when an entity goes
-   * off-screen for a longer time (minutes), when it comes back it may be given
-   * a new instance ID.
-   * 
- * - * string instance_id = 1; - * - * @return The bytes for instanceId. - */ - public com.google.protobuf.ByteString getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int TIME_OFFSET_FIELD_NUMBER = 2; - private com.google.protobuf.Duration timeOffset_; - /** - * - * - *
-   * Required. A time (frame) of a video to which this annotation pertains.
-   * Represented as the duration since the video's start.
-   * 
- * - * .google.protobuf.Duration time_offset = 2; - * - * @return Whether the timeOffset field is set. - */ - public boolean hasTimeOffset() { - return timeOffset_ != null; - } - /** - * - * - *
-   * Required. A time (frame) of a video to which this annotation pertains.
-   * Represented as the duration since the video's start.
-   * 
- * - * .google.protobuf.Duration time_offset = 2; - * - * @return The timeOffset. - */ - public com.google.protobuf.Duration getTimeOffset() { - return timeOffset_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeOffset_; - } - /** - * - * - *
-   * Required. A time (frame) of a video to which this annotation pertains.
-   * Represented as the duration since the video's start.
-   * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { - return getTimeOffset(); - } - - public static final int BOUNDING_BOX_FIELD_NUMBER = 3; - private com.google.cloud.automl.v1beta1.BoundingPoly boundingBox_; - /** - * - * - *
-   * Required. The rectangle representing the object location on the frame (i.e.
-   * at the time_offset of the video).
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - * - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBox_ != null; - } - /** - * - * - *
-   * Required. The rectangle representing the object location on the frame (i.e.
-   * at the time_offset of the video).
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - * - * @return The boundingBox. - */ - public com.google.cloud.automl.v1beta1.BoundingPoly getBoundingBox() { - return boundingBox_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } - /** - * - * - *
-   * Required. The rectangle representing the object location on the frame (i.e.
-   * at the time_offset of the video).
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - public com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - return getBoundingBox(); - } - - public static final int SCORE_FIELD_NUMBER = 4; - private float score_; - /** - * - * - *
-   * Output only. The confidence that this annotation is positive for the video at
-   * the time_offset, value in [0, 1], higher means higher positivity
-   * confidence. For annotations created by the user the score is 1. When
-   * user approves an annotation, the original float score is kept (and not
-   * changed to 1).
-   * 
- * - * float score = 4; - * - * @return The score. - */ - public float getScore() { - return score_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getInstanceIdBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceId_); - } - if (timeOffset_ != null) { - output.writeMessage(2, getTimeOffset()); - } - if (boundingBox_ != null) { - output.writeMessage(3, getBoundingBox()); - } - if (score_ != 0F) { - output.writeFloat(4, score_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getInstanceIdBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceId_); - } - if (timeOffset_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTimeOffset()); - } - if (boundingBox_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBoundingBox()); - } - if (score_ != 0F) { - size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, score_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation other = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) obj; - - if (!getInstanceId().equals(other.getInstanceId())) return false; - if (hasTimeOffset() != other.hasTimeOffset()) return false; - if (hasTimeOffset()) { - if (!getTimeOffset().equals(other.getTimeOffset())) return false; - } - if (hasBoundingBox() != other.hasBoundingBox()) return false; - if (hasBoundingBox()) { - if (!getBoundingBox().equals(other.getBoundingBox())) return false; - } - if (java.lang.Float.floatToIntBits(getScore()) - != java.lang.Float.floatToIntBits(other.getScore())) return false; - if (!unknownFields.equals(other.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_ID_FIELD_NUMBER; - hash = (53 * hash) + getInstanceId().hashCode(); - if (hasTimeOffset()) { - hash = (37 * hash) + TIME_OFFSET_FIELD_NUMBER; - hash = (53 * hash) + getTimeOffset().hashCode(); - } - if (hasBoundingBox()) { - hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBox().hashCode(); - } - hash = (37 * hash) + SCORE_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Annotation details for video object tracking.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - instanceId_ = ""; - - if (timeOffsetBuilder_ == null) { - timeOffset_ = null; - } else { - timeOffset_ = null; - timeOffsetBuilder_ = null; - } - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - score_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingAnnotation_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation build() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation buildPartial() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation result = - new com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation(this); - result.instanceId_ = instanceId_; - if (timeOffsetBuilder_ == null) { - result.timeOffset_ = timeOffset_; - } else { - result.timeOffset_ = timeOffsetBuilder_.build(); - } - if (boundingBoxBuilder_ == null) { - result.boundingBox_ = boundingBox_; - } else { - result.boundingBox_ = boundingBoxBuilder_.build(); - } - result.score_ = score_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) { - return mergeFrom((com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation other) { - if (other - == com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance()) - return this; - if (!other.getInstanceId().isEmpty()) { - instanceId_ = other.instanceId_; - onChanged(); - } - if (other.hasTimeOffset()) { - mergeTimeOffset(other.getTimeOffset()); - } - if (other.hasBoundingBox()) { - mergeBoundingBox(other.getBoundingBox()); - } - if (other.getScore() != 0F) { - setScore(other.getScore()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object instanceId_ = ""; - /** - * - * - *
-     * Optional. The instance of the object, expressed as a positive integer. Used to tell
-     * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-     * present on a single example.
-     * NOTE: Instance ID prediction quality is not a part of model evaluation and
-     * is done as best effort. Especially in cases when an entity goes
-     * off-screen for a longer time (minutes), when it comes back it may be given
-     * a new instance ID.
-     * 
- * - * string instance_id = 1; - * - * @return The instanceId. - */ - public java.lang.String getInstanceId() { - java.lang.Object ref = instanceId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - instanceId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The instance of the object, expressed as a positive integer. Used to tell
-     * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-     * present on a single example.
-     * NOTE: Instance ID prediction quality is not a part of model evaluation and
-     * is done as best effort. Especially in cases when an entity goes
-     * off-screen for a longer time (minutes), when it comes back it may be given
-     * a new instance ID.
-     * 
- * - * string instance_id = 1; - * - * @return The bytes for instanceId. - */ - public com.google.protobuf.ByteString getInstanceIdBytes() { - java.lang.Object ref = instanceId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - instanceId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The instance of the object, expressed as a positive integer. Used to tell
-     * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-     * present on a single example.
-     * NOTE: Instance ID prediction quality is not a part of model evaluation and
-     * is done as best effort. Especially in cases when an entity goes
-     * off-screen for a longer time (minutes), when it comes back it may be given
-     * a new instance ID.
-     * 
- * - * string instance_id = 1; - * - * @param value The instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - instanceId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The instance of the object, expressed as a positive integer. Used to tell
-     * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-     * present on a single example.
-     * NOTE: Instance ID prediction quality is not a part of model evaluation and
-     * is done as best effort. Especially in cases when an entity goes
-     * off-screen for a longer time (minutes), when it comes back it may be given
-     * a new instance ID.
-     * 
- * - * string instance_id = 1; - * - * @return This builder for chaining. - */ - public Builder clearInstanceId() { - - instanceId_ = getDefaultInstance().getInstanceId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The instance of the object, expressed as a positive integer. Used to tell
-     * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-     * present on a single example.
-     * NOTE: Instance ID prediction quality is not a part of model evaluation and
-     * is done as best effort. Especially in cases when an entity goes
-     * off-screen for a longer time (minutes), when it comes back it may be given
-     * a new instance ID.
-     * 
- * - * string instance_id = 1; - * - * @param value The bytes for instanceId to set. - * @return This builder for chaining. - */ - public Builder setInstanceIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - instanceId_ = value; - onChanged(); - 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_; - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - * - * @return Whether the timeOffset field is set. - */ - public boolean hasTimeOffset() { - return timeOffsetBuilder_ != null || timeOffset_ != null; - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - * - * @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(); - } - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - 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; - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - public Builder setTimeOffset(com.google.protobuf.Duration.Builder builderForValue) { - if (timeOffsetBuilder_ == null) { - timeOffset_ = builderForValue.build(); - onChanged(); - } else { - timeOffsetBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - 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; - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - public Builder clearTimeOffset() { - if (timeOffsetBuilder_ == null) { - timeOffset_ = null; - onChanged(); - } else { - timeOffset_ = null; - timeOffsetBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - public com.google.protobuf.Duration.Builder getTimeOffsetBuilder() { - - onChanged(); - return getTimeOffsetFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - public com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder() { - if (timeOffsetBuilder_ != null) { - return timeOffsetBuilder_.getMessageOrBuilder(); - } else { - return timeOffset_ == null - ? com.google.protobuf.Duration.getDefaultInstance() - : timeOffset_; - } - } - /** - * - * - *
-     * Required. A time (frame) of a video to which this annotation pertains.
-     * Represented as the duration since the video's start.
-     * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - 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.cloud.automl.v1beta1.BoundingPoly boundingBox_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder> - boundingBoxBuilder_; - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - * - * @return Whether the boundingBox field is set. - */ - public boolean hasBoundingBox() { - return boundingBoxBuilder_ != null || boundingBox_ != null; - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - * - * @return The boundingBox. - */ - public com.google.cloud.automl.v1beta1.BoundingPoly getBoundingBox() { - if (boundingBoxBuilder_ == null) { - return boundingBox_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } else { - return boundingBoxBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - public Builder setBoundingBox(com.google.cloud.automl.v1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundingBox_ = value; - onChanged(); - } else { - boundingBoxBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - public Builder setBoundingBox( - com.google.cloud.automl.v1beta1.BoundingPoly.Builder builderForValue) { - if (boundingBoxBuilder_ == null) { - boundingBox_ = builderForValue.build(); - onChanged(); - } else { - boundingBoxBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - public Builder mergeBoundingBox(com.google.cloud.automl.v1beta1.BoundingPoly value) { - if (boundingBoxBuilder_ == null) { - if (boundingBox_ != null) { - boundingBox_ = - com.google.cloud.automl.v1beta1.BoundingPoly.newBuilder(boundingBox_) - .mergeFrom(value) - .buildPartial(); - } else { - boundingBox_ = value; - } - onChanged(); - } else { - boundingBoxBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - public Builder clearBoundingBox() { - if (boundingBoxBuilder_ == null) { - boundingBox_ = null; - onChanged(); - } else { - boundingBox_ = null; - boundingBoxBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - public com.google.cloud.automl.v1beta1.BoundingPoly.Builder getBoundingBoxBuilder() { - - onChanged(); - return getBoundingBoxFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - public com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder() { - if (boundingBoxBuilder_ != null) { - return boundingBoxBuilder_.getMessageOrBuilder(); - } else { - return boundingBox_ == null - ? com.google.cloud.automl.v1beta1.BoundingPoly.getDefaultInstance() - : boundingBox_; - } - } - /** - * - * - *
-     * Required. The rectangle representing the object location on the frame (i.e.
-     * at the time_offset of the video).
-     * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder> - getBoundingBoxFieldBuilder() { - if (boundingBoxBuilder_ == null) { - boundingBoxBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingPoly, - com.google.cloud.automl.v1beta1.BoundingPoly.Builder, - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder>( - getBoundingBox(), getParentForChildren(), isClean()); - boundingBox_ = null; - } - return boundingBoxBuilder_; - } - - private float score_; - /** - * - * - *
-     * Output only. The confidence that this annotation is positive for the video at
-     * the time_offset, value in [0, 1], higher means higher positivity
-     * confidence. For annotations created by the user the score is 1. When
-     * user approves an annotation, the original float score is kept (and not
-     * changed to 1).
-     * 
- * - * float score = 4; - * - * @return The score. - */ - public float getScore() { - return score_; - } - /** - * - * - *
-     * Output only. The confidence that this annotation is positive for the video at
-     * the time_offset, value in [0, 1], higher means higher positivity
-     * confidence. For annotations created by the user the score is 1. When
-     * user approves an annotation, the original float score is kept (and not
-     * changed to 1).
-     * 
- * - * float score = 4; - * - * @param value The score to set. - * @return This builder for chaining. - */ - public Builder setScore(float value) { - - score_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The confidence that this annotation is positive for the video at
-     * the time_offset, value in [0, 1], higher means higher positivity
-     * confidence. For annotations created by the user the score is 1. When
-     * user approves an annotation, the original float score is kept (and not
-     * changed to 1).
-     * 
- * - * float score = 4; - * - * @return This builder for chaining. - */ - public Builder clearScore() { - - score_ = 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.automl.v1beta1.VideoObjectTrackingAnnotation) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) - private static final com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation(); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoObjectTrackingAnnotation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VideoObjectTrackingAnnotation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java deleted file mode 100644 index 2547cb92d..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingAnnotationOrBuilder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -public interface VideoObjectTrackingAnnotationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. The instance of the object, expressed as a positive integer. Used to tell
-   * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-   * present on a single example.
-   * NOTE: Instance ID prediction quality is not a part of model evaluation and
-   * is done as best effort. Especially in cases when an entity goes
-   * off-screen for a longer time (minutes), when it comes back it may be given
-   * a new instance ID.
-   * 
- * - * string instance_id = 1; - * - * @return The instanceId. - */ - java.lang.String getInstanceId(); - /** - * - * - *
-   * Optional. The instance of the object, expressed as a positive integer. Used to tell
-   * apart objects of the same type (i.e. AnnotationSpec) when multiple are
-   * present on a single example.
-   * NOTE: Instance ID prediction quality is not a part of model evaluation and
-   * is done as best effort. Especially in cases when an entity goes
-   * off-screen for a longer time (minutes), when it comes back it may be given
-   * a new instance ID.
-   * 
- * - * string instance_id = 1; - * - * @return The bytes for instanceId. - */ - com.google.protobuf.ByteString getInstanceIdBytes(); - - /** - * - * - *
-   * Required. A time (frame) of a video to which this annotation pertains.
-   * Represented as the duration since the video's start.
-   * 
- * - * .google.protobuf.Duration time_offset = 2; - * - * @return Whether the timeOffset field is set. - */ - boolean hasTimeOffset(); - /** - * - * - *
-   * Required. A time (frame) of a video to which this annotation pertains.
-   * Represented as the duration since the video's start.
-   * 
- * - * .google.protobuf.Duration time_offset = 2; - * - * @return The timeOffset. - */ - com.google.protobuf.Duration getTimeOffset(); - /** - * - * - *
-   * Required. A time (frame) of a video to which this annotation pertains.
-   * Represented as the duration since the video's start.
-   * 
- * - * .google.protobuf.Duration time_offset = 2; - */ - com.google.protobuf.DurationOrBuilder getTimeOffsetOrBuilder(); - - /** - * - * - *
-   * Required. The rectangle representing the object location on the frame (i.e.
-   * at the time_offset of the video).
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - * - * @return Whether the boundingBox field is set. - */ - boolean hasBoundingBox(); - /** - * - * - *
-   * Required. The rectangle representing the object location on the frame (i.e.
-   * at the time_offset of the video).
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - * - * @return The boundingBox. - */ - com.google.cloud.automl.v1beta1.BoundingPoly getBoundingBox(); - /** - * - * - *
-   * Required. The rectangle representing the object location on the frame (i.e.
-   * at the time_offset of the video).
-   * 
- * - * .google.cloud.automl.v1beta1.BoundingPoly bounding_box = 3; - */ - com.google.cloud.automl.v1beta1.BoundingPolyOrBuilder getBoundingBoxOrBuilder(); - - /** - * - * - *
-   * Output only. The confidence that this annotation is positive for the video at
-   * the time_offset, value in [0, 1], higher means higher positivity
-   * confidence. For annotations created by the user the score is 1. When
-   * user approves an annotation, the original float score is kept (and not
-   * changed to 1).
-   * 
- * - * float score = 4; - * - * @return The score. - */ - float getScore(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadata.java deleted file mode 100644 index 573e718fb..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadata.java +++ /dev/null @@ -1,469 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Dataset metadata specific to video object tracking.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} - */ -public final class VideoObjectTrackingDatasetMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - VideoObjectTrackingDatasetMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use VideoObjectTrackingDatasetMetadata.newBuilder() to construct. - private VideoObjectTrackingDatasetMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VideoObjectTrackingDatasetMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VideoObjectTrackingDatasetMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VideoObjectTrackingDatasetMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata other = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Dataset metadata specific to video object tracking.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata build() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata buildPartial() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata result = - new com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - private static final com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata(); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoObjectTrackingDatasetMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VideoObjectTrackingDatasetMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadataOrBuilder.java deleted file mode 100644 index f9075c2fe..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingDatasetMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -public interface VideoObjectTrackingDatasetMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.VideoObjectTrackingDatasetMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetrics.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetrics.java deleted file mode 100644 index 137209370..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetrics.java +++ /dev/null @@ -1,1384 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model evaluation metrics for video object tracking problems.
- * Evaluates prediction quality of both labeled bounding boxes and labeled
- * tracks (i.e. series of bounding boxes sharing same label and instance ID).
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} - */ -public final class VideoObjectTrackingEvaluationMetrics - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - VideoObjectTrackingEvaluationMetricsOrBuilder { - private static final long serialVersionUID = 0L; - // Use VideoObjectTrackingEvaluationMetrics.newBuilder() to construct. - private VideoObjectTrackingEvaluationMetrics( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VideoObjectTrackingEvaluationMetrics() { - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VideoObjectTrackingEvaluationMetrics(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VideoObjectTrackingEvaluationMetrics( - 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: - { - evaluatedFrameCount_ = input.readInt32(); - break; - } - case 16: - { - evaluatedBoundingBoxCount_ = input.readInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - new java.util.ArrayList< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry>(); - mutable_bitField0_ |= 0x00000001; - } - boundingBoxMetricsEntries_.add( - input.readMessage( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.parser(), - extensionRegistry)); - break; - } - case 53: - { - boundingBoxMeanAveragePrecision_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder.class); - } - - public static final int EVALUATED_FRAME_COUNT_FIELD_NUMBER = 1; - private int evaluatedFrameCount_; - /** - * - * - *
-   * Output only. The number of video frames used to create this evaluation.
-   * 
- * - * int32 evaluated_frame_count = 1; - * - * @return The evaluatedFrameCount. - */ - public int getEvaluatedFrameCount() { - return evaluatedFrameCount_; - } - - public static final int EVALUATED_BOUNDING_BOX_COUNT_FIELD_NUMBER = 2; - private int evaluatedBoundingBoxCount_; - /** - * - * - *
-   * Output only. The total number of bounding boxes (i.e. summed over all
-   * frames) the ground truth used to create this evaluation had.
-   * 
- * - * int32 evaluated_bounding_box_count = 2; - * - * @return The evaluatedBoundingBoxCount. - */ - public int getEvaluatedBoundingBoxCount() { - return evaluatedBoundingBoxCount_; - } - - public static final int BOUNDING_BOX_METRICS_ENTRIES_FIELD_NUMBER = 4; - private java.util.List - boundingBoxMetricsEntries_; - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesList() { - return boundingBoxMetricsEntries_; - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesOrBuilderList() { - return boundingBoxMetricsEntries_; - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public int getBoundingBoxMetricsEntriesCount() { - return boundingBoxMetricsEntries_.size(); - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getBoundingBoxMetricsEntries( - int index) { - return boundingBoxMetricsEntries_.get(index); - } - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder - getBoundingBoxMetricsEntriesOrBuilder(int index) { - return boundingBoxMetricsEntries_.get(index); - } - - public static final int BOUNDING_BOX_MEAN_AVERAGE_PRECISION_FIELD_NUMBER = 6; - private float boundingBoxMeanAveragePrecision_; - /** - * - * - *
-   * Output only. The single metric for bounding boxes evaluation:
-   * the mean_average_precision averaged over all bounding_box_metrics_entries.
-   * 
- * - * float bounding_box_mean_average_precision = 6; - * - * @return The boundingBoxMeanAveragePrecision. - */ - public float getBoundingBoxMeanAveragePrecision() { - return boundingBoxMeanAveragePrecision_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (evaluatedFrameCount_ != 0) { - output.writeInt32(1, evaluatedFrameCount_); - } - if (evaluatedBoundingBoxCount_ != 0) { - output.writeInt32(2, evaluatedBoundingBoxCount_); - } - for (int i = 0; i < boundingBoxMetricsEntries_.size(); i++) { - output.writeMessage(4, boundingBoxMetricsEntries_.get(i)); - } - if (boundingBoxMeanAveragePrecision_ != 0F) { - output.writeFloat(6, boundingBoxMeanAveragePrecision_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (evaluatedFrameCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, evaluatedFrameCount_); - } - if (evaluatedBoundingBoxCount_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, evaluatedBoundingBoxCount_); - } - for (int i = 0; i < boundingBoxMetricsEntries_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 4, boundingBoxMetricsEntries_.get(i)); - } - if (boundingBoxMeanAveragePrecision_ != 0F) { - size += - com.google.protobuf.CodedOutputStream.computeFloatSize( - 6, boundingBoxMeanAveragePrecision_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics other = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) obj; - - if (getEvaluatedFrameCount() != other.getEvaluatedFrameCount()) return false; - if (getEvaluatedBoundingBoxCount() != other.getEvaluatedBoundingBoxCount()) return false; - if (!getBoundingBoxMetricsEntriesList().equals(other.getBoundingBoxMetricsEntriesList())) - return false; - if (java.lang.Float.floatToIntBits(getBoundingBoxMeanAveragePrecision()) - != java.lang.Float.floatToIntBits(other.getBoundingBoxMeanAveragePrecision())) return false; - if (!unknownFields.equals(other.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) + EVALUATED_FRAME_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getEvaluatedFrameCount(); - hash = (37 * hash) + EVALUATED_BOUNDING_BOX_COUNT_FIELD_NUMBER; - hash = (53 * hash) + getEvaluatedBoundingBoxCount(); - if (getBoundingBoxMetricsEntriesCount() > 0) { - hash = (37 * hash) + BOUNDING_BOX_METRICS_ENTRIES_FIELD_NUMBER; - hash = (53 * hash) + getBoundingBoxMetricsEntriesList().hashCode(); - } - hash = (37 * hash) + BOUNDING_BOX_MEAN_AVERAGE_PRECISION_FIELD_NUMBER; - hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoundingBoxMeanAveragePrecision()); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 evaluation metrics for video object tracking problems.
-   * Evaluates prediction quality of both labeled bounding boxes and labeled
-   * tracks (i.e. series of bounding boxes sharing same label and instance ID).
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetricsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.Builder.class); - } - - // Construct using - // com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBoundingBoxMetricsEntriesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - evaluatedFrameCount_ = 0; - - evaluatedBoundingBoxCount_ = 0; - - if (boundingBoxMetricsEntriesBuilder_ == null) { - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - boundingBoxMetricsEntriesBuilder_.clear(); - } - boundingBoxMeanAveragePrecision_ = 0F; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.Detection - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingEvaluationMetrics_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics build() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics buildPartial() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics result = - new com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics(this); - int from_bitField0_ = bitField0_; - result.evaluatedFrameCount_ = evaluatedFrameCount_; - result.evaluatedBoundingBoxCount_ = evaluatedBoundingBoxCount_; - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.boundingBoxMetricsEntries_ = boundingBoxMetricsEntries_; - } else { - result.boundingBoxMetricsEntries_ = boundingBoxMetricsEntriesBuilder_.build(); - } - result.boundingBoxMeanAveragePrecision_ = boundingBoxMeanAveragePrecision_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) { - return mergeFrom( - (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics other) { - if (other - == com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - .getDefaultInstance()) return this; - if (other.getEvaluatedFrameCount() != 0) { - setEvaluatedFrameCount(other.getEvaluatedFrameCount()); - } - if (other.getEvaluatedBoundingBoxCount() != 0) { - setEvaluatedBoundingBoxCount(other.getEvaluatedBoundingBoxCount()); - } - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (!other.boundingBoxMetricsEntries_.isEmpty()) { - if (boundingBoxMetricsEntries_.isEmpty()) { - boundingBoxMetricsEntries_ = other.boundingBoxMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.addAll(other.boundingBoxMetricsEntries_); - } - onChanged(); - } - } else { - if (!other.boundingBoxMetricsEntries_.isEmpty()) { - if (boundingBoxMetricsEntriesBuilder_.isEmpty()) { - boundingBoxMetricsEntriesBuilder_.dispose(); - boundingBoxMetricsEntriesBuilder_ = null; - boundingBoxMetricsEntries_ = other.boundingBoxMetricsEntries_; - bitField0_ = (bitField0_ & ~0x00000001); - boundingBoxMetricsEntriesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getBoundingBoxMetricsEntriesFieldBuilder() - : null; - } else { - boundingBoxMetricsEntriesBuilder_.addAllMessages(other.boundingBoxMetricsEntries_); - } - } - } - if (other.getBoundingBoxMeanAveragePrecision() != 0F) { - setBoundingBoxMeanAveragePrecision(other.getBoundingBoxMeanAveragePrecision()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private int evaluatedFrameCount_; - /** - * - * - *
-     * Output only. The number of video frames used to create this evaluation.
-     * 
- * - * int32 evaluated_frame_count = 1; - * - * @return The evaluatedFrameCount. - */ - public int getEvaluatedFrameCount() { - return evaluatedFrameCount_; - } - /** - * - * - *
-     * Output only. The number of video frames used to create this evaluation.
-     * 
- * - * int32 evaluated_frame_count = 1; - * - * @param value The evaluatedFrameCount to set. - * @return This builder for chaining. - */ - public Builder setEvaluatedFrameCount(int value) { - - evaluatedFrameCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The number of video frames used to create this evaluation.
-     * 
- * - * int32 evaluated_frame_count = 1; - * - * @return This builder for chaining. - */ - public Builder clearEvaluatedFrameCount() { - - evaluatedFrameCount_ = 0; - onChanged(); - return this; - } - - private int evaluatedBoundingBoxCount_; - /** - * - * - *
-     * Output only. The total number of bounding boxes (i.e. summed over all
-     * frames) the ground truth used to create this evaluation had.
-     * 
- * - * int32 evaluated_bounding_box_count = 2; - * - * @return The evaluatedBoundingBoxCount. - */ - public int getEvaluatedBoundingBoxCount() { - return evaluatedBoundingBoxCount_; - } - /** - * - * - *
-     * Output only. The total number of bounding boxes (i.e. summed over all
-     * frames) the ground truth used to create this evaluation had.
-     * 
- * - * int32 evaluated_bounding_box_count = 2; - * - * @param value The evaluatedBoundingBoxCount to set. - * @return This builder for chaining. - */ - public Builder setEvaluatedBoundingBoxCount(int value) { - - evaluatedBoundingBoxCount_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The total number of bounding boxes (i.e. summed over all
-     * frames) the ground truth used to create this evaluation had.
-     * 
- * - * int32 evaluated_bounding_box_count = 2; - * - * @return This builder for chaining. - */ - public Builder clearEvaluatedBoundingBoxCount() { - - evaluatedBoundingBoxCount_ = 0; - onChanged(); - return this; - } - - private java.util.List - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - - private void ensureBoundingBoxMetricsEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - boundingBoxMetricsEntries_ = - new java.util.ArrayList( - boundingBoxMetricsEntries_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder> - boundingBoxMetricsEntriesBuilder_; - - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesList() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - } else { - return boundingBoxMetricsEntriesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public int getBoundingBoxMetricsEntriesCount() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return boundingBoxMetricsEntries_.size(); - } else { - return boundingBoxMetricsEntriesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getBoundingBoxMetricsEntries( - int index) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return boundingBoxMetricsEntries_.get(index); - } else { - return boundingBoxMetricsEntriesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder setBoundingBoxMetricsEntries( - int index, com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry value) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.set(index, value); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder setBoundingBoxMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder builderForValue) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.set(index, builderForValue.build()); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder addBoundingBoxMetricsEntries( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry value) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(value); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder addBoundingBoxMetricsEntries( - int index, com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry value) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(index, value); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder addBoundingBoxMetricsEntries( - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder builderForValue) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(builderForValue.build()); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder addBoundingBoxMetricsEntries( - int index, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder builderForValue) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.add(index, builderForValue.build()); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder addAllBoundingBoxMetricsEntries( - java.lang.Iterable - values) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, boundingBoxMetricsEntries_); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder clearBoundingBoxMetricsEntries() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - boundingBoxMetricsEntries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public Builder removeBoundingBoxMetricsEntries(int index) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - ensureBoundingBoxMetricsEntriesIsMutable(); - boundingBoxMetricsEntries_.remove(index); - onChanged(); - } else { - boundingBoxMetricsEntriesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder - getBoundingBoxMetricsEntriesBuilder(int index) { - return getBoundingBoxMetricsEntriesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder - getBoundingBoxMetricsEntriesOrBuilder(int index) { - if (boundingBoxMetricsEntriesBuilder_ == null) { - return boundingBoxMetricsEntries_.get(index); - } else { - return boundingBoxMetricsEntriesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public java.util.List< - ? extends com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder> - getBoundingBoxMetricsEntriesOrBuilderList() { - if (boundingBoxMetricsEntriesBuilder_ != null) { - return boundingBoxMetricsEntriesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boundingBoxMetricsEntries_); - } - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder - addBoundingBoxMetricsEntriesBuilder() { - return getBoundingBoxMetricsEntriesFieldBuilder() - .addBuilder(com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder - addBoundingBoxMetricsEntriesBuilder(int index) { - return getBoundingBoxMetricsEntriesFieldBuilder() - .addBuilder( - index, com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. The bounding boxes match metrics for each
-     * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-     * pair.
-     * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - public java.util.List - getBoundingBoxMetricsEntriesBuilderList() { - return getBoundingBoxMetricsEntriesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder> - getBoundingBoxMetricsEntriesFieldBuilder() { - if (boundingBoxMetricsEntriesBuilder_ == null) { - boundingBoxMetricsEntriesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry.Builder, - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder>( - boundingBoxMetricsEntries_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - boundingBoxMetricsEntries_ = null; - } - return boundingBoxMetricsEntriesBuilder_; - } - - private float boundingBoxMeanAveragePrecision_; - /** - * - * - *
-     * Output only. The single metric for bounding boxes evaluation:
-     * the mean_average_precision averaged over all bounding_box_metrics_entries.
-     * 
- * - * float bounding_box_mean_average_precision = 6; - * - * @return The boundingBoxMeanAveragePrecision. - */ - public float getBoundingBoxMeanAveragePrecision() { - return boundingBoxMeanAveragePrecision_; - } - /** - * - * - *
-     * Output only. The single metric for bounding boxes evaluation:
-     * the mean_average_precision averaged over all bounding_box_metrics_entries.
-     * 
- * - * float bounding_box_mean_average_precision = 6; - * - * @param value The boundingBoxMeanAveragePrecision to set. - * @return This builder for chaining. - */ - public Builder setBoundingBoxMeanAveragePrecision(float value) { - - boundingBoxMeanAveragePrecision_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The single metric for bounding boxes evaluation:
-     * the mean_average_precision averaged over all bounding_box_metrics_entries.
-     * 
- * - * float bounding_box_mean_average_precision = 6; - * - * @return This builder for chaining. - */ - public Builder clearBoundingBoxMeanAveragePrecision() { - - boundingBoxMeanAveragePrecision_ = 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.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - private static final com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics(); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoObjectTrackingEvaluationMetrics parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VideoObjectTrackingEvaluationMetrics(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetricsOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetricsOrBuilder.java deleted file mode 100644 index 92490f52c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingEvaluationMetricsOrBuilder.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/detection.proto - -package com.google.cloud.automl.v1beta1; - -public interface VideoObjectTrackingEvaluationMetricsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.VideoObjectTrackingEvaluationMetrics) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The number of video frames used to create this evaluation.
-   * 
- * - * int32 evaluated_frame_count = 1; - * - * @return The evaluatedFrameCount. - */ - int getEvaluatedFrameCount(); - - /** - * - * - *
-   * Output only. The total number of bounding boxes (i.e. summed over all
-   * frames) the ground truth used to create this evaluation had.
-   * 
- * - * int32 evaluated_bounding_box_count = 2; - * - * @return The evaluatedBoundingBoxCount. - */ - int getEvaluatedBoundingBoxCount(); - - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - java.util.List - getBoundingBoxMetricsEntriesList(); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntry getBoundingBoxMetricsEntries(int index); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - int getBoundingBoxMetricsEntriesCount(); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - java.util.List - getBoundingBoxMetricsEntriesOrBuilderList(); - /** - * - * - *
-   * Output only. The bounding boxes match metrics for each
-   * Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99
-   * pair.
-   * 
- * - * - * repeated .google.cloud.automl.v1beta1.BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - * - */ - com.google.cloud.automl.v1beta1.BoundingBoxMetricsEntryOrBuilder - getBoundingBoxMetricsEntriesOrBuilder(int index); - - /** - * - * - *
-   * Output only. The single metric for bounding boxes evaluation:
-   * the mean_average_precision averaged over all bounding_box_metrics_entries.
-   * 
- * - * float bounding_box_mean_average_precision = 6; - * - * @return The boundingBoxMeanAveragePrecision. - */ - float getBoundingBoxMeanAveragePrecision(); -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadata.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadata.java deleted file mode 100644 index a7c34adb2..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadata.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -/** - * - * - *
- * Model metadata specific to video object tracking.
- * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} - */ -public final class VideoObjectTrackingModelMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - VideoObjectTrackingModelMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use VideoObjectTrackingModelMetadata.newBuilder() to construct. - private VideoObjectTrackingModelMetadata( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private VideoObjectTrackingModelMetadata() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new VideoObjectTrackingModelMetadata(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private VideoObjectTrackingModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder.class); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata)) { - return super.equals(obj); - } - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata other = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) obj; - - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 video object tracking.
-   * 
- * - * Protobuf type {@code google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.class, - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.Builder.class); - } - - // Construct using com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.automl.v1beta1.VideoProto - .internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_descriptor; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - getDefaultInstanceForType() { - return com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata build() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata buildPartial() { - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata result = - new com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) { - return mergeFrom((com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata other) { - if (other - == com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata.getDefaultInstance()) - return this; - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - } - - // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - private static final com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata(); - } - - public static com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public VideoObjectTrackingModelMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new VideoObjectTrackingModelMetadata(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadataOrBuilder.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadataOrBuilder.java deleted file mode 100644 index c0eb46acb..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoObjectTrackingModelMetadataOrBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -public interface VideoObjectTrackingModelMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.VideoObjectTrackingModelMetadata) - com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoProto.java b/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoProto.java deleted file mode 100644 index 5148ea56c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/VideoProto.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/automl/v1beta1/video.proto - -package com.google.cloud.automl.v1beta1; - -public final class VideoProto { - private VideoProto() {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} - - public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); - } - - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n\'google/cloud/automl/v1beta1/video.prot" - + "o\022\033google.cloud.automl.v1beta1\0320google/c" - + "loud/automl/v1beta1/classification.proto" - + "\032\034google/api/annotations.proto\"$\n\"VideoC" - + "lassificationDatasetMetadata\"$\n\"VideoObj" - + "ectTrackingDatasetMetadata\"\"\n VideoClass" - + "ificationModelMetadata\"\"\n VideoObjectTra" - + "ckingModelMetadataB\261\001\n\037com.google.cloud." - + "automl.v1beta1B\nVideoProtoP\001ZAgoogle.gol" - + "ang.org/genproto/googleapis/cloud/automl" - + "/v1beta1;automl\312\002\033Google\\Cloud\\AutoMl\\V1" - + "beta1\352\002\036Google::Cloud::AutoML::V1beta1b\006" - + "proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), - }); - internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_VideoClassificationDatasetMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingDatasetMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_VideoClassificationModelMetadata_descriptor, - new java.lang.String[] {}); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_automl_v1beta1_VideoObjectTrackingModelMetadata_descriptor, - new java.lang.String[] {}); - com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/annotation_payload.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/annotation_payload.proto deleted file mode 100644 index f62bb269e..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/annotation_payload.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/classification.proto"; -import "google/cloud/automl/v1beta1/detection.proto"; -import "google/cloud/automl/v1beta1/tables.proto"; -import "google/cloud/automl/v1beta1/text_extraction.proto"; -import "google/cloud/automl/v1beta1/text_sentiment.proto"; -import "google/cloud/automl/v1beta1/translation.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Contains annotation information that is relevant to AutoML. -message AnnotationPayload { - // Output only . Additional information about the annotation - // specific to the AutoML domain. - oneof detail { - // Annotation details for translation. - TranslationAnnotation translation = 2; - - // Annotation details for content or image classification. - ClassificationAnnotation classification = 3; - - // Annotation details for image object detection. - ImageObjectDetectionAnnotation image_object_detection = 4; - - // Annotation details for video classification. - // Returned for Video Classification predictions. - VideoClassificationAnnotation video_classification = 9; - - // Annotation details for video object tracking. - VideoObjectTrackingAnnotation video_object_tracking = 8; - - // Annotation details for text extraction. - TextExtractionAnnotation text_extraction = 6; - - // Annotation details for text sentiment. - TextSentimentAnnotation text_sentiment = 7; - - // Annotation details for Tables. - TablesAnnotation tables = 10; - } - - // Output only . The resource ID of the annotation spec that - // this annotation pertains to. The annotation spec comes from either an - // ancestor dataset, or the dataset that was used to train the model in use. - string annotation_spec_id = 1; - - // Output only. The value of - // [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] - // when the model was trained. Because this field returns a value at model - // training time, for different models trained using the same dataset, the - // returned value could be different as model owner could update the - // `display_name` between any two model training. - string display_name = 5; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/annotation_spec.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/annotation_spec.proto deleted file mode 100644 index d9df07ee3..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/annotation_spec.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/resource.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A definition of an annotation spec. -message AnnotationSpec { - option (google.api.resource) = { - type: "automl.googleapis.com/AnnotationSpec" - pattern: "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}" - }; - - // Output only. Resource name of the annotation spec. - // Form: - // - // 'projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationSpecs/{annotation_spec_id}' - string name = 1; - - // Required. The name of the annotation spec to show in the interface. The name can be - // up to 32 characters long and must match the regexp `[a-zA-Z0-9_]+`. - string display_name = 2; - - // Output only. The number of examples in the parent dataset - // labeled by the annotation spec. - int32 example_count = 9; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/classification.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/classification.proto deleted file mode 100644 index 0594d01e6..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/classification.proto +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/temporal.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_outer_classname = "ClassificationProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Type of the classification problem. -enum ClassificationType { - // An un-set value of this enum. - CLASSIFICATION_TYPE_UNSPECIFIED = 0; - - // At most one label is allowed per example. - MULTICLASS = 1; - - // Multiple labels are allowed for one example. - MULTILABEL = 2; -} - -// Contains annotation details specific to classification. -message ClassificationAnnotation { - // Output only. A confidence estimate between 0.0 and 1.0. A higher value - // means greater confidence that the annotation is positive. If a user - // approves an annotation as negative or positive, the score value remains - // unchanged. If a user creates an annotation, the score is 0 for negative or - // 1 for positive. - float score = 1; -} - -// Contains annotation details specific to video classification. -message VideoClassificationAnnotation { - // Output only. Expresses the type of video classification. Possible values: - // - // * `segment` - Classification done on a specified by user - // time segment of a video. AnnotationSpec is answered to be present - // in that time segment, if it is present in any part of it. The video - // ML model evaluations are done only for this type of classification. - // - // * `shot`- Shot-level classification. - // AutoML Video Intelligence determines the boundaries - // for each camera shot in the entire segment of the video that user - // specified in the request configuration. AutoML Video Intelligence - // 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 training data, but there are no - // metrics provided to describe that quality. - // - // * `1s_interval` - AutoML Video Intelligence returns labels and their - // confidence scores for each second of the entire segment of the video - // that user specified in the request configuration. - // WARNING: Model evaluation is not done for this classification type, - // the quality of it depends on training data, but there are no - // metrics provided to describe that quality. - string type = 1; - - // Output only . The classification details of this annotation. - ClassificationAnnotation classification_annotation = 2; - - // Output only . The time segment of the video to which the - // annotation applies. - TimeSegment time_segment = 3; -} - -// Model evaluation metrics for classification problems. -// Note: For Video Classification this metrics only describe quality of the -// Video Classification predictions of "segment_classification" type. -message ClassificationEvaluationMetrics { - // Metrics for a single confidence threshold. - message ConfidenceMetricsEntry { - // Output only. Metrics are computed with an assumption that the model - // never returns predictions with score lower than this value. - float confidence_threshold = 1; - - // Output only. Metrics are computed with an assumption that the model - // always returns at most this many predictions (ordered by their score, - // descendingly), but they all still need to meet the confidence_threshold. - int32 position_threshold = 14; - - // Output only. Recall (True Positive Rate) for the given confidence - // threshold. - float recall = 2; - - // Output only. Precision for the given confidence threshold. - float precision = 3; - - // Output only. False Positive Rate for the given confidence threshold. - float false_positive_rate = 8; - - // Output only. The harmonic mean of recall and precision. - float f1_score = 4; - - // Output only. The Recall (True Positive Rate) when only considering the - // label that has the highest prediction score and not below the confidence - // threshold for each example. - float recall_at1 = 5; - - // Output only. The precision when only considering the label that has the - // highest prediction score and not below the confidence threshold for each - // example. - float precision_at1 = 6; - - // Output only. The False Positive Rate when only considering the label that - // has the highest prediction score and not below the confidence threshold - // for each example. - float false_positive_rate_at1 = 9; - - // Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1]. - float f1_score_at1 = 7; - - // Output only. The number of model created labels that match a ground truth - // label. - int64 true_positive_count = 10; - - // Output only. The number of model created labels that do not match a - // ground truth label. - int64 false_positive_count = 11; - - // Output only. The number of ground truth labels that are not matched - // by a model created label. - int64 false_negative_count = 12; - - // Output only. The number of labels that were not created by the model, - // but if they would, they would not match a ground truth label. - int64 true_negative_count = 13; - } - - // Confusion matrix of the model running the classification. - message ConfusionMatrix { - // Output only. A row in the confusion matrix. - message Row { - // Output only. Value of the specific cell in the confusion matrix. - // The number of values each row has (i.e. the length of the row) is equal - // to the length of the `annotation_spec_id` field or, if that one is not - // populated, length of the [display_name][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.display_name] field. - repeated int32 example_count = 1; - } - - // Output only. IDs of the annotation specs used in the confusion matrix. - // For Tables CLASSIFICATION - // - // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - // only list of [annotation_spec_display_name-s][] is populated. - repeated string annotation_spec_id = 1; - - // Output only. Display name of the annotation specs used in the confusion - // matrix, as they were at the moment of the evaluation. For Tables - // CLASSIFICATION - // - // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type], - // distinct values of the target column at the moment of the model - // evaluation are populated here. - repeated string display_name = 3; - - // Output only. Rows in the confusion matrix. The number of rows is equal to - // the size of `annotation_spec_id`. - // `row[i].example_count[j]` is the number of examples that have ground - // truth of the `annotation_spec_id[i]` and are predicted as - // `annotation_spec_id[j]` by the model being evaluated. - repeated Row row = 2; - } - - // Output only. The Area Under Precision-Recall Curve metric. Micro-averaged - // for the overall evaluation. - float au_prc = 1; - - // Output only. The Area Under Precision-Recall Curve metric based on priors. - // Micro-averaged for the overall evaluation. - // Deprecated. - float base_au_prc = 2 [deprecated = true]; - - // Output only. The Area Under Receiver Operating Characteristic curve metric. - // Micro-averaged for the overall evaluation. - float au_roc = 6; - - // Output only. The Log Loss metric. - float log_loss = 7; - - // Output only. Metrics for each confidence_threshold in - // 0.00,0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 and - // position_threshold = INT32_MAX_VALUE. - // ROC and precision-recall curves, and other aggregated metrics are derived - // from them. The confidence metrics entries may also be supplied for - // additional values of position_threshold, but from these no aggregated - // metrics are computed. - repeated ConfidenceMetricsEntry confidence_metrics_entry = 3; - - // Output only. Confusion matrix of the evaluation. - // Only set for MULTICLASS classification problems where number - // of labels is no more than 10. - // Only set for model level evaluation, not for evaluation per label. - ConfusionMatrix confusion_matrix = 4; - - // Output only. The annotation spec ids used for this evaluation. - repeated string annotation_spec_id = 5; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/column_spec.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/column_spec.proto deleted file mode 100644 index 03389b8a4..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/column_spec.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/data_stats.proto"; -import "google/cloud/automl/v1beta1/data_types.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A representation of a column in a relational table. When listing them, column specs are returned in the same order in which they were -// given on import . -// Used by: -// * Tables -message ColumnSpec { - option (google.api.resource) = { - type: "automl.googleapis.com/ColumnSpec" - pattern: "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}" - }; - - // Identifies the table's column, and its correlation with the column this - // ColumnSpec describes. - message CorrelatedColumn { - // The column_spec_id of the correlated column, which belongs to the same - // table as the in-context column. - string column_spec_id = 1; - - // Correlation between this and the in-context column. - CorrelationStats correlation_stats = 2; - } - - // Output only. The resource name of the column specs. - // Form: - // - // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}/columnSpecs/{column_spec_id}` - string name = 1; - - // The data type of elements stored in the column. - DataType data_type = 2; - - // Output only. The name of the column to show in the interface. The name can - // be up to 100 characters long and can consist only of ASCII Latin letters - // A-Z and a-z, ASCII digits 0-9, underscores(_), and forward slashes(/), and - // must start with a letter or a digit. - string display_name = 3; - - // Output only. Stats of the series of values in the column. - // This field may be stale, see the ancestor's - // Dataset.tables_dataset_metadata.stats_update_time field - // for the timestamp at which these stats were last updated. - DataStats data_stats = 4; - - // Deprecated. - repeated CorrelatedColumn top_correlated_columns = 5; - - // Used to perform consistent read-modify-write updates. If not set, a blind - // "overwrite" update happens. - string etag = 6; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_items.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_items.proto deleted file mode 100644 index 9b9187ad3..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_items.proto +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/geometry.proto"; -import "google/cloud/automl/v1beta1/io.proto"; -import "google/cloud/automl/v1beta1/temporal.proto"; -import "google/cloud/automl/v1beta1/text_segment.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/struct.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A representation of an image. -// Only images up to 30MB in size are supported. -message Image { - // Input only. The data representing the image. - // For Predict calls [image_bytes][google.cloud.automl.v1beta1.Image.image_bytes] must be set, as other options are not - // currently supported by prediction API. You can read the contents of an - // uploaded image by using the [content_uri][google.cloud.automl.v1beta1.Image.content_uri] field. - oneof data { - // Image content represented as a stream of bytes. - // Note: As with all `bytes` fields, protobuffers use a pure binary - // representation, whereas JSON representations use base64. - bytes image_bytes = 1; - - // An input config specifying the content of the image. - InputConfig input_config = 6; - } - - // Output only. HTTP URI to the thumbnail image. - string thumbnail_uri = 4; -} - -// A representation of a text snippet. -message TextSnippet { - // Required. The content of the text snippet as a string. Up to 250000 - // characters long. - string content = 1; - - // Optional. The format of [content][google.cloud.automl.v1beta1.TextSnippet.content]. Currently the only two allowed - // values are "text/html" and "text/plain". If left blank, the format is - // automatically determined from the type of the uploaded [content][google.cloud.automl.v1beta1.TextSnippet.content]. - string mime_type = 2; - - // Output only. HTTP URI where you can download the content. - string content_uri = 4; -} - -// Message that describes dimension of a document. -message DocumentDimensions { - // Unit of the document dimension. - enum DocumentDimensionUnit { - // Should not be used. - DOCUMENT_DIMENSION_UNIT_UNSPECIFIED = 0; - - // Document dimension is measured in inches. - INCH = 1; - - // Document dimension is measured in centimeters. - CENTIMETER = 2; - - // Document dimension is measured in points. 72 points = 1 inch. - POINT = 3; - } - - // Unit of the dimension. - DocumentDimensionUnit unit = 1; - - // Width value of the document, works together with the unit. - float width = 2; - - // Height value of the document, works together with the unit. - float height = 3; -} - -// A structured text document e.g. a PDF. -message Document { - // Describes the layout information of a [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the document. - message Layout { - // The type of TextSegment in the context of the original document. - enum TextSegmentType { - // Should not be used. - TEXT_SEGMENT_TYPE_UNSPECIFIED = 0; - - // The text segment is a token. e.g. word. - TOKEN = 1; - - // The text segment is a paragraph. - PARAGRAPH = 2; - - // The text segment is a form field. - FORM_FIELD = 3; - - // The text segment is the name part of a form field. It will be treated - // as child of another FORM_FIELD TextSegment if its span is subspan of - // another TextSegment with type FORM_FIELD. - FORM_FIELD_NAME = 4; - - // The text segment is the text content part of a form field. It will be - // treated as child of another FORM_FIELD TextSegment if its span is - // subspan of another TextSegment with type FORM_FIELD. - FORM_FIELD_CONTENTS = 5; - - // The text segment is a whole table, including headers, and all rows. - TABLE = 6; - - // The text segment is a table's headers. It will be treated as child of - // another TABLE TextSegment if its span is subspan of another TextSegment - // with type TABLE. - TABLE_HEADER = 7; - - // The text segment is a row in table. It will be treated as child of - // another TABLE TextSegment if its span is subspan of another TextSegment - // with type TABLE. - TABLE_ROW = 8; - - // The text segment is a cell in table. It will be treated as child of - // another TABLE_ROW TextSegment if its span is subspan of another - // TextSegment with type TABLE_ROW. - TABLE_CELL = 9; - } - - // Text Segment that represents a segment in - // [document_text][google.cloud.automl.v1beta1.Document.document_text]. - TextSegment text_segment = 1; - - // Page number of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the original document, starts - // from 1. - int32 page_number = 2; - - // The position of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in the page. - // Contains exactly 4 - // - // [normalized_vertices][google.cloud.automl.v1beta1.BoundingPoly.normalized_vertices] - // and they are connected by edges in the order provided, which will - // represent a rectangle parallel to the frame. The - // [NormalizedVertex-s][google.cloud.automl.v1beta1.NormalizedVertex] are - // relative to the page. - // Coordinates are based on top-left as point (0,0). - BoundingPoly bounding_poly = 3; - - // The type of the [text_segment][google.cloud.automl.v1beta1.Document.Layout.text_segment] in document. - TextSegmentType text_segment_type = 4; - } - - // An input config specifying the content of the document. - DocumentInputConfig input_config = 1; - - // The plain text version of this document. - TextSnippet document_text = 2; - - // Describes the layout of the document. - // Sorted by [page_number][]. - repeated Layout layout = 3; - - // The dimensions of the page in the document. - DocumentDimensions document_dimensions = 4; - - // Number of pages in the document. - int32 page_count = 5; -} - -// A representation of a row in a relational table. -message Row { - // The resource IDs of the column specs describing the columns of the row. - // If set must contain, but possibly in a different order, all input - // feature - // - // [column_spec_ids][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - // of the Model this row is being passed to. - // Note: The below `values` field must match order of this field, if this - // field is set. - repeated string column_spec_ids = 2; - - // Required. The values of the row cells, given in the same order as the - // column_spec_ids, or, if not set, then in the same order as input - // feature - // - // [column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - // of the Model this row is being passed to. - repeated google.protobuf.Value values = 3; -} - -// Example data used for training or prediction. -message ExamplePayload { - // Required. Input only. The example data. - oneof payload { - // Example image. - Image image = 1; - - // Example text. - TextSnippet text_snippet = 2; - - // Example document. - Document document = 4; - - // Example relational table row. - Row row = 3; - } -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_stats.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_stats.proto deleted file mode 100644 index c13a5d451..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_stats.proto +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// The data statistics of a series of values that share the same DataType. -message DataStats { - // The data statistics specific to a DataType. - oneof stats { - // The statistics for FLOAT64 DataType. - Float64Stats float64_stats = 3; - - // The statistics for STRING DataType. - StringStats string_stats = 4; - - // The statistics for TIMESTAMP DataType. - TimestampStats timestamp_stats = 5; - - // The statistics for ARRAY DataType. - ArrayStats array_stats = 6; - - // The statistics for STRUCT DataType. - StructStats struct_stats = 7; - - // The statistics for CATEGORY DataType. - CategoryStats category_stats = 8; - } - - // The number of distinct values. - int64 distinct_value_count = 1; - - // The number of values that are null. - int64 null_value_count = 2; - - // The number of values that are valid. - int64 valid_value_count = 9; -} - -// The data statistics of a series of FLOAT64 values. -message Float64Stats { - // A bucket of a histogram. - message HistogramBucket { - // The minimum value of the bucket, inclusive. - double min = 1; - - // The maximum value of the bucket, exclusive unless max = `"Infinity"`, in - // which case it's inclusive. - double max = 2; - - // The number of data values that are in the bucket, i.e. are between - // min and max values. - int64 count = 3; - } - - // The mean of the series. - double mean = 1; - - // The standard deviation of the series. - double standard_deviation = 2; - - // Ordered from 0 to k k-quantile values of the data series of n values. - // The value at index i is, approximately, the i*n/k-th smallest value in the - // series; for i = 0 and i = k these are, respectively, the min and max - // values. - repeated double quantiles = 3; - - // Histogram buckets of the data series. Sorted by the min value of the - // bucket, ascendingly, and the number of the buckets is dynamically - // generated. The buckets are non-overlapping and completely cover whole - // FLOAT64 range with min of first bucket being `"-Infinity"`, and max of - // the last one being `"Infinity"`. - repeated HistogramBucket histogram_buckets = 4; -} - -// The data statistics of a series of STRING values. -message StringStats { - // The statistics of a unigram. - message UnigramStats { - // The unigram. - string value = 1; - - // The number of occurrences of this unigram in the series. - int64 count = 2; - } - - // The statistics of the top 20 unigrams, ordered by - // [count][google.cloud.automl.v1beta1.StringStats.UnigramStats.count]. - repeated UnigramStats top_unigram_stats = 1; -} - -// The data statistics of a series of TIMESTAMP values. -message TimestampStats { - // Stats split by a defined in context granularity. - message GranularStats { - // A map from granularity key to example count for that key. - // E.g. for hour_of_day `13` means 1pm, or for month_of_year `5` means May). - map buckets = 1; - } - - // The string key is the pre-defined granularity. Currently supported: - // hour_of_day, day_of_week, month_of_year. - // Granularities finer that the granularity of timestamp data are not - // populated (e.g. if timestamps are at day granularity, then hour_of_day - // is not populated). - map granular_stats = 1; -} - -// The data statistics of a series of ARRAY values. -message ArrayStats { - // Stats of all the values of all arrays, as if they were a single long - // series of data. The type depends on the element type of the array. - DataStats member_stats = 2; -} - -// The data statistics of a series of STRUCT values. -message StructStats { - // Map from a field name of the struct to data stats aggregated over series - // of all data in that field across all the structs. - map field_stats = 1; -} - -// The data statistics of a series of CATEGORY values. -message CategoryStats { - // The statistics of a single CATEGORY value. - message SingleCategoryStats { - // The CATEGORY value. - string value = 1; - - // The number of occurrences of this value in the series. - int64 count = 2; - } - - // The statistics of the top 20 CATEGORY values, ordered by - // - // [count][google.cloud.automl.v1beta1.CategoryStats.SingleCategoryStats.count]. - repeated SingleCategoryStats top_category_stats = 1; -} - -// A correlation statistics between two series of DataType values. The series -// may have differing DataType-s, but within a single series the DataType must -// be the same. -message CorrelationStats { - // The correlation value using the Cramer's V measure. - double cramers_v = 1; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_types.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_types.proto deleted file mode 100644 index 6f77f56b9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/data_types.proto +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// `TypeCode` is used as a part of -// [DataType][google.cloud.automl.v1beta1.DataType]. -enum TypeCode { - // Not specified. Should not be used. - TYPE_CODE_UNSPECIFIED = 0; - - // Encoded as `number`, or the strings `"NaN"`, `"Infinity"`, or - // `"-Infinity"`. - FLOAT64 = 3; - - // Must be between 0AD and 9999AD. Encoded as `string` according to - // [time_format][google.cloud.automl.v1beta1.DataType.time_format], or, if - // that format is not set, then in RFC 3339 `date-time` format, where - // `time-offset` = `"Z"` (e.g. 1985-04-12T23:20:50.52Z). - TIMESTAMP = 4; - - // Encoded as `string`. - STRING = 6; - - // Encoded as `list`, where the list elements are represented according to - // - // [list_element_type][google.cloud.automl.v1beta1.DataType.list_element_type]. - ARRAY = 8; - - // Encoded as `struct`, where field values are represented according to - // [struct_type][google.cloud.automl.v1beta1.DataType.struct_type]. - STRUCT = 9; - - // Values of this type are not further understood by AutoML, - // e.g. AutoML is unable to tell the order of values (as it could with - // FLOAT64), or is unable to say if one value contains another (as it - // could with STRING). - // Encoded as `string` (bytes should be base64-encoded, as described in RFC - // 4648, section 4). - CATEGORY = 10; -} - -// Indicated the type of data that can be stored in a structured data entity -// (e.g. a table). -message DataType { - // Details of DataType-s that need additional specification. - oneof details { - // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [ARRAY][google.cloud.automl.v1beta1.TypeCode.ARRAY], - // then `list_element_type` is the type of the elements. - DataType list_element_type = 2; - - // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT], then `struct_type` - // provides type information for the struct's fields. - StructType struct_type = 3; - - // If [type_code][google.cloud.automl.v1beta1.DataType.type_code] == [TIMESTAMP][google.cloud.automl.v1beta1.TypeCode.TIMESTAMP] - // then `time_format` provides 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 as described on the type_code is used. - string time_format = 5; - } - - // Required. The [TypeCode][google.cloud.automl.v1beta1.TypeCode] for this type. - TypeCode type_code = 1; - - // If true, this DataType can also be `NULL`. In .CSV files `NULL` value is - // expressed as an empty string. - bool nullable = 4; -} - -// `StructType` defines the DataType-s of a [STRUCT][google.cloud.automl.v1beta1.TypeCode.STRUCT] type. -message StructType { - // Unordered map of struct field names to their data types. - // Fields cannot be added or removed via Update. Their names and - // data types are still mutable. - map fields = 1; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/dataset.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/dataset.proto deleted file mode 100644 index 8d1b8d937..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/dataset.proto +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/image.proto"; -import "google/cloud/automl/v1beta1/tables.proto"; -import "google/cloud/automl/v1beta1/text.proto"; -import "google/cloud/automl/v1beta1/translation.proto"; -import "google/cloud/automl/v1beta1/video.proto"; -import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A workspace for solving a single, particular machine learning (ML) problem. -// A workspace contains examples that may be annotated. -message Dataset { - option (google.api.resource) = { - type: "automl.googleapis.com/Dataset" - pattern: "projects/{project}/locations/{location}/datasets/{dataset}" - }; - - // Required. - // The dataset metadata that is specific to the problem type. - oneof dataset_metadata { - // Metadata for a dataset used for translation. - TranslationDatasetMetadata translation_dataset_metadata = 23; - - // Metadata for a dataset used for image classification. - ImageClassificationDatasetMetadata image_classification_dataset_metadata = 24; - - // Metadata for a dataset used for text classification. - TextClassificationDatasetMetadata text_classification_dataset_metadata = 25; - - // Metadata for a dataset used for image object detection. - ImageObjectDetectionDatasetMetadata image_object_detection_dataset_metadata = 26; - - // Metadata for a dataset used for video classification. - VideoClassificationDatasetMetadata video_classification_dataset_metadata = 31; - - // Metadata for a dataset used for video object tracking. - VideoObjectTrackingDatasetMetadata video_object_tracking_dataset_metadata = 29; - - // Metadata for a dataset used for text extraction. - TextExtractionDatasetMetadata text_extraction_dataset_metadata = 28; - - // Metadata for a dataset used for text sentiment. - TextSentimentDatasetMetadata text_sentiment_dataset_metadata = 30; - - // Metadata for a dataset used for Tables. - TablesDatasetMetadata tables_dataset_metadata = 33; - } - - // Output only. The resource name of the dataset. - // Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}` - string name = 1; - - // Required. The name of the dataset to show in the interface. The name can be - // up to 32 characters long and can consist only of ASCII Latin letters A-Z - // and a-z, underscores - // (_), and ASCII digits 0-9. - string display_name = 2; - - // User-provided description of the dataset. The description can be up to - // 25000 characters long. - string description = 3; - - // Output only. The number of examples in the dataset. - int32 example_count = 21; - - // Output only. Timestamp when this dataset was created. - google.protobuf.Timestamp create_time = 14; - - // Used to perform consistent read-modify-write updates. If not set, a blind - // "overwrite" update happens. - string etag = 17; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/detection.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/detection.proto deleted file mode 100644 index c5864e209..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/detection.proto +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/geometry.proto"; -import "google/protobuf/duration.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Annotation details for image object detection. -message ImageObjectDetectionAnnotation { - // Output only. The rectangle representing the object location. - BoundingPoly bounding_box = 1; - - // Output only. The confidence that this annotation is positive for the parent example, - // value in [0, 1], higher means higher positivity confidence. - float score = 2; -} - -// Annotation details for video object tracking. -message VideoObjectTrackingAnnotation { - // Optional. The instance of the object, expressed as a positive integer. Used to tell - // apart objects of the same type (i.e. AnnotationSpec) when multiple are - // present on a single example. - // NOTE: Instance ID prediction quality is not a part of model evaluation and - // is done as best effort. Especially in cases when an entity goes - // off-screen for a longer time (minutes), when it comes back it may be given - // a new instance ID. - string instance_id = 1; - - // Required. A time (frame) of a video to which this annotation pertains. - // Represented as the duration since the video's start. - google.protobuf.Duration time_offset = 2; - - // Required. The rectangle representing the object location on the frame (i.e. - // at the time_offset of the video). - BoundingPoly bounding_box = 3; - - // Output only. The confidence that this annotation is positive for the video at - // the time_offset, value in [0, 1], higher means higher positivity - // confidence. For annotations created by the user the score is 1. When - // user approves an annotation, the original float score is kept (and not - // changed to 1). - float score = 4; -} - -// Bounding box matching model metrics for a single intersection-over-union -// threshold and multiple label match confidence thresholds. -message BoundingBoxMetricsEntry { - // Metrics for a single confidence threshold. - message ConfidenceMetricsEntry { - // Output only. The confidence threshold value used to compute the metrics. - float confidence_threshold = 1; - - // Output only. Recall under the given confidence threshold. - float recall = 2; - - // Output only. Precision under the given confidence threshold. - float precision = 3; - - // Output only. The harmonic mean of recall and precision. - float f1_score = 4; - } - - // Output only. The intersection-over-union threshold value used to compute - // this metrics entry. - float iou_threshold = 1; - - // Output only. The mean average precision, most often close to au_prc. - float mean_average_precision = 2; - - // Output only. Metrics for each label-match confidence_threshold from - // 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99. Precision-recall curve is - // derived from them. - repeated ConfidenceMetricsEntry confidence_metrics_entries = 3; -} - -// Model evaluation metrics for image object detection problems. -// Evaluates prediction quality of labeled bounding boxes. -message ImageObjectDetectionEvaluationMetrics { - // Output only. The total number of bounding boxes (i.e. summed over all - // images) the ground truth used to create this evaluation had. - int32 evaluated_bounding_box_count = 1; - - // Output only. The bounding boxes match metrics for each - // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - // pair. - repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 2; - - // Output only. The single metric for bounding boxes evaluation: - // the mean_average_precision averaged over all bounding_box_metrics_entries. - float bounding_box_mean_average_precision = 3; -} - -// Model evaluation metrics for video object tracking problems. -// Evaluates prediction quality of both labeled bounding boxes and labeled -// tracks (i.e. series of bounding boxes sharing same label and instance ID). -message VideoObjectTrackingEvaluationMetrics { - // Output only. The number of video frames used to create this evaluation. - int32 evaluated_frame_count = 1; - - // Output only. The total number of bounding boxes (i.e. summed over all - // frames) the ground truth used to create this evaluation had. - int32 evaluated_bounding_box_count = 2; - - // Output only. The bounding boxes match metrics for each - // Intersection-over-union threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - // and each label confidence threshold 0.05,0.10,...,0.95,0.96,0.97,0.98,0.99 - // pair. - repeated BoundingBoxMetricsEntry bounding_box_metrics_entries = 4; - - // Output only. The single metric for bounding boxes evaluation: - // the mean_average_precision averaged over all bounding_box_metrics_entries. - float bounding_box_mean_average_precision = 6; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/geometry.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/geometry.proto deleted file mode 100644 index d5654aaca..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/geometry.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A vertex represents a 2D point in the image. -// The normalized vertex coordinates are between 0 to 1 fractions relative to -// the original plane (image, video). E.g. if the plane (e.g. whole image) would -// have size 10 x 20 then a point with normalized coordinates (0.1, 0.3) would -// be at the position (1, 6) on that plane. -message NormalizedVertex { - // Required. Horizontal coordinate. - float x = 1; - - // Required. Vertical coordinate. - float y = 2; -} - -// A bounding polygon of a detected object on a plane. -// On output both vertices and normalized_vertices are provided. -// The polygon is formed by connecting vertices in the order they are listed. -message BoundingPoly { - // Output only . The bounding polygon normalized vertices. - repeated NormalizedVertex normalized_vertices = 2; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/image.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/image.proto deleted file mode 100644 index 960eaeb01..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/image.proto +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/annotation_spec.proto"; -import "google/cloud/automl/v1beta1/classification.proto"; -import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "ImageProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Dataset metadata that is specific to image classification. -message ImageClassificationDatasetMetadata { - // Required. Type of the classification problem. - ClassificationType classification_type = 1; -} - -// Dataset metadata specific to image object detection. -message ImageObjectDetectionDatasetMetadata { - -} - -// Model metadata for image classification. -message ImageClassificationModelMetadata { - // Optional. The ID of the `base` model. If it is specified, the new model - // will be created based on the `base` model. Otherwise, the new model will be - // created from scratch. The `base` model must be in the same - // `project` and `location` as the new model to create, and have the same - // `model_type`. - string base_model_id = 1; - - // Required. The train budget of creating this model, expressed in hours. The - // actual `train_cost` will be equal or less than this value. - int64 train_budget = 2; - - // Output only. The actual train cost of creating this model, expressed in - // hours. If this model is created from a `base` model, the train cost used - // to create the `base` model are not included. - int64 train_cost = 3; - - // Output only. The reason that this create model operation stopped, - // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - string stop_reason = 5; - - // Optional. Type of the model. The available values are: - // * `cloud` - Model to be used via prediction calls to AutoML API. - // This is the default value. - // * `mobile-low-latency-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. Expected to have low latency, but - // may have lower prediction quality than other models. - // * `mobile-versatile-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. - // * `mobile-high-accuracy-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. Expected to have a higher - // latency, but should also have a higher prediction quality - // than other models. - // * `mobile-core-ml-low-latency-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - // ML afterwards. Expected to have low latency, but may have - // lower prediction quality than other models. - // * `mobile-core-ml-versatile-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with Core - // ML afterwards. - // * `mobile-core-ml-high-accuracy-1` - A model that, in addition to - // providing prediction via AutoML API, can also be exported - // (see [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile device with - // Core ML afterwards. Expected to have a higher latency, but - // should also have a higher prediction quality than other - // models. - string model_type = 7; - - // Output only. An approximate number of online prediction QPS that can - // be supported by this model per each node on which it is deployed. - double node_qps = 13; - - // Output only. The number of nodes this model is deployed on. A node is an - // abstraction of a machine resource, which can handle online prediction QPS - // as given in the node_qps field. - int64 node_count = 14; -} - -// Model metadata specific to image object detection. -message ImageObjectDetectionModelMetadata { - // Optional. Type of the model. The available values are: - // * `cloud-high-accuracy-1` - (default) A model to be used via prediction - // calls to AutoML API. Expected to have a higher latency, but - // should also have a higher prediction quality than other - // models. - // * `cloud-low-latency-1` - A model to be used via prediction - // calls to AutoML API. Expected to have low latency, but may - // have lower prediction quality than other models. - // * `mobile-low-latency-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. Expected to have low latency, but - // may have lower prediction quality than other models. - // * `mobile-versatile-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. - // * `mobile-high-accuracy-1` - A model that, in addition to providing - // prediction via AutoML API, can also be exported (see - // [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]) and used on a mobile or edge device - // with TensorFlow afterwards. Expected to have a higher - // latency, but should also have a higher prediction quality - // than other models. - string model_type = 1; - - // Output only. The number of nodes this model is deployed on. A node is an - // abstraction of a machine resource, which can handle online prediction QPS - // as given in the qps_per_node field. - int64 node_count = 3; - - // Output only. An approximate number of online prediction QPS that can - // be supported by this model per each node on which it is deployed. - double node_qps = 4; - - // Output only. The reason that this create model operation stopped, - // e.g. `BUDGET_REACHED`, `MODEL_CONVERGED`. - string stop_reason = 5; - - // 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 actual - // `train_cost` will be equal or less than this value. If further model - // training ceases to provide any improvements, it will stop without using - // full budget and the stop_reason will be `MODEL_CONVERGED`. - // Note, node_hour = actual_hour * number_of_nodes_invovled. - // For model type `cloud-high-accuracy-1`(default) and `cloud-low-latency-1`, - // the train 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. - // For model type `mobile-low-latency-1`, `mobile-versatile-1`, - // `mobile-high-accuracy-1`, `mobile-core-ml-low-latency-1`, - // `mobile-core-ml-versatile-1`, `mobile-core-ml-high-accuracy-1`, the train - // 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. - int64 train_budget_milli_node_hours = 6; - - // Output only. The actual train 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 the train budget. - int64 train_cost_milli_node_hours = 7; -} - -// Model deployment metadata specific to Image Classification. -message ImageClassificationModelDeploymentMetadata { - // Input only. The number of nodes to deploy the model on. A node is an - // abstraction of a machine resource, which can handle online prediction QPS - // as given in the model's - // - // [node_qps][google.cloud.automl.v1beta1.ImageClassificationModelMetadata.node_qps]. - // Must be between 1 and 100, inclusive on both ends. - int64 node_count = 1; -} - -// Model deployment metadata specific to Image Object Detection. -message ImageObjectDetectionModelDeploymentMetadata { - // Input only. The number of nodes to deploy the model on. A node is an - // abstraction of a machine resource, which can handle online prediction QPS - // as given in the model's - // - // [qps_per_node][google.cloud.automl.v1beta1.ImageObjectDetectionModelMetadata.qps_per_node]. - // Must be between 1 and 100, inclusive on both ends. - int64 node_count = 1; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/io.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/io.proto deleted file mode 100644 index a99793830..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/io.proto +++ /dev/null @@ -1,1132 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Input configuration for ImportData Action. -// -// The format of input depends on dataset_metadata the Dataset into which -// the import is happening has. As input source the -// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] -// is expected, unless specified otherwise. Additionally any input .CSV file -// by itself must be 100MB or smaller, unless specified otherwise. -// If an "example" file (that is, image, video etc.) with identical content -// (even if it had different GCS_FILE_PATH) is mentioned multiple times, then -// its label, bounding boxes etc. are appended. The same file should be always -// provided with the same ML_USE and GCS_FILE_PATH, if it is not, then -// these values are nondeterministically selected from the given ones. -// -// The formats are represented in EBNF with commas being literal and with -// non-terminal symbols defined near the end of this comment. The formats are: -// -// * For Image Classification: -// CSV file(s) with each line in format: -// ML_USE,GCS_FILE_PATH,LABEL,LABEL,... -// GCS_FILE_PATH leads to image of up to 30MB in size. Supported -// extensions: .JPEG, .GIF, .PNG, .WEBP, .BMP, .TIFF, .ICO -// For MULTICLASS classification type, at most one LABEL is allowed -// per image. If an image has not yet been labeled, then it should be -// mentioned just once with no LABEL. -// Some sample rows: -// TRAIN,gs://folder/image1.jpg,daisy -// TEST,gs://folder/image2.jpg,dandelion,tulip,rose -// UNASSIGNED,gs://folder/image3.jpg,daisy -// UNASSIGNED,gs://folder/image4.jpg -// -// * For Image Object Detection: -// CSV file(s) with each line in format: -// ML_USE,GCS_FILE_PATH,(LABEL,BOUNDING_BOX | ,,,,,,,) -// GCS_FILE_PATH leads to image of up to 30MB in size. Supported -// extensions: .JPEG, .GIF, .PNG. -// Each image is assumed to be exhaustively labeled. The minimum -// allowed BOUNDING_BOX edge length is 0.01, and no more than 500 -// BOUNDING_BOX-es per image are allowed (one BOUNDING_BOX is defined -// per line). If an image has not yet been labeled, then it should be -// mentioned just once with no LABEL and the ",,,,,,," in place of the -// BOUNDING_BOX. For images which are known to not contain any -// bounding boxes, they should be labelled explictly as -// "NEGATIVE_IMAGE", followed by ",,,,,,," in place of the -// BOUNDING_BOX. -// Sample rows: -// TRAIN,gs://folder/image1.png,car,0.1,0.1,,,0.3,0.3,, -// TRAIN,gs://folder/image1.png,bike,.7,.6,,,.8,.9,, -// UNASSIGNED,gs://folder/im2.png,car,0.1,0.1,0.2,0.1,0.2,0.3,0.1,0.3 -// TEST,gs://folder/im3.png,,,,,,,,, -// TRAIN,gs://folder/im4.png,NEGATIVE_IMAGE,,,,,,,,, -// -// * For Video Classification: -// CSV file(s) with each line in format: -// ML_USE,GCS_FILE_PATH -// where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH -// should lead to another .csv file which describes examples that have -// given ML_USE, using the following row format: -// GCS_FILE_PATH,(LABEL,TIME_SEGMENT_START,TIME_SEGMENT_END | ,,) -// Here GCS_FILE_PATH leads to a video of up to 50GB in size and up -// to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. -// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the -// length of the video, and end has to be after the start. Any segment -// of a video which has one or more labels on it, is considered a -// hard negative for all other labels. Any segment with no labels on -// it is considered to be unknown. If a whole video is unknown, then -// it shuold be mentioned just once with ",," in place of LABEL, -// TIME_SEGMENT_START,TIME_SEGMENT_END. -// Sample top level CSV file: -// TRAIN,gs://folder/train_videos.csv -// TEST,gs://folder/test_videos.csv -// UNASSIGNED,gs://folder/other_videos.csv -// Sample rows of a CSV file for a particular ML_USE: -// gs://folder/video1.avi,car,120,180.000021 -// gs://folder/video1.avi,bike,150,180.000021 -// gs://folder/vid2.avi,car,0,60.5 -// gs://folder/vid3.avi,,, -// -// * For Video Object Tracking: -// CSV file(s) with each line in format: -// ML_USE,GCS_FILE_PATH -// where ML_USE VALIDATE value should not be used. The GCS_FILE_PATH -// should lead to another .csv file which describes examples that have -// given ML_USE, using one of the following row format: -// GCS_FILE_PATH,LABEL,[INSTANCE_ID],TIMESTAMP,BOUNDING_BOX -// or -// GCS_FILE_PATH,,,,,,,,,, -// Here GCS_FILE_PATH leads to a video of up to 50GB in size and up -// to 3h duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. -// Providing INSTANCE_IDs can help to obtain a better model. When -// a specific labeled entity leaves the video frame, and shows up -// afterwards it is not required, albeit preferable, that the same -// INSTANCE_ID is given to it. -// TIMESTAMP must be within the length of the video, the -// BOUNDING_BOX is assumed to be drawn on the closest video's frame -// to the TIMESTAMP. Any mentioned by the TIMESTAMP frame is expected -// to be exhaustively labeled and no more than 500 BOUNDING_BOX-es per -// frame are allowed. If a whole video is unknown, then it should be -// mentioned just once with ",,,,,,,,,," in place of LABEL, -// [INSTANCE_ID],TIMESTAMP,BOUNDING_BOX. -// Sample top level CSV file: -// TRAIN,gs://folder/train_videos.csv -// TEST,gs://folder/test_videos.csv -// UNASSIGNED,gs://folder/other_videos.csv -// Seven sample rows of a CSV file for a particular ML_USE: -// gs://folder/video1.avi,car,1,12.10,0.8,0.8,0.9,0.8,0.9,0.9,0.8,0.9 -// gs://folder/video1.avi,car,1,12.90,0.4,0.8,0.5,0.8,0.5,0.9,0.4,0.9 -// gs://folder/video1.avi,car,2,12.10,.4,.2,.5,.2,.5,.3,.4,.3 -// gs://folder/video1.avi,car,2,12.90,.8,.2,,,.9,.3,, -// gs://folder/video1.avi,bike,,12.50,.45,.45,,,.55,.55,, -// gs://folder/video2.avi,car,1,0,.1,.9,,,.9,.1,, -// gs://folder/video2.avi,,,,,,,,,,, -// * For Text Extraction: -// CSV file(s) with each line in format: -// ML_USE,GCS_FILE_PATH -// GCS_FILE_PATH leads to a .JSONL (that is, JSON Lines) file which -// either imports text in-line or as documents. Any given -// .JSONL file must be 100MB or smaller. -// The in-line .JSONL file contains, per line, a proto that wraps a -// TextSnippet proto (in json representation) followed by one or more -// AnnotationPayload protos (called annotations), which have -// display_name and text_extraction detail populated. The given text -// is expected to be annotated exhaustively, for example, if you look -// for animals and text contains "dolphin" that is not labeled, then -// "dolphin" is assumed to not be an animal. Any given text snippet -// content must be 10KB or smaller, and also be UTF-8 NFC encoded -// (ASCII already is). -// The document .JSONL file contains, per line, a proto that wraps a -// Document proto. The Document proto must have either document_text -// or input_config set. In document_text case, the Document proto may -// also contain the spatial information of the document, including -// layout, document dimension and page number. In input_config case, -// only PDF documents are supported now, and each document may be up -// to 2MB large. Currently, annotations on documents cannot be -// specified at import. -// Three sample CSV rows: -// TRAIN,gs://folder/file1.jsonl -// VALIDATE,gs://folder/file2.jsonl -// TEST,gs://folder/file3.jsonl -// Sample in-line JSON Lines file for entity extraction (presented here -// with artificial line breaks, but the only actual line break is -// denoted by \n).: -// { -// "document": { -// "document_text": {"content": "dog cat"} -// "layout": [ -// { -// "text_segment": { -// "start_offset": 0, -// "end_offset": 3, -// }, -// "page_number": 1, -// "bounding_poly": { -// "normalized_vertices": [ -// {"x": 0.1, "y": 0.1}, -// {"x": 0.1, "y": 0.3}, -// {"x": 0.3, "y": 0.3}, -// {"x": 0.3, "y": 0.1}, -// ], -// }, -// "text_segment_type": TOKEN, -// }, -// { -// "text_segment": { -// "start_offset": 4, -// "end_offset": 7, -// }, -// "page_number": 1, -// "bounding_poly": { -// "normalized_vertices": [ -// {"x": 0.4, "y": 0.1}, -// {"x": 0.4, "y": 0.3}, -// {"x": 0.8, "y": 0.3}, -// {"x": 0.8, "y": 0.1}, -// ], -// }, -// "text_segment_type": TOKEN, -// } -// -// ], -// "document_dimensions": { -// "width": 8.27, -// "height": 11.69, -// "unit": INCH, -// } -// "page_count": 1, -// }, -// "annotations": [ -// { -// "display_name": "animal", -// "text_extraction": {"text_segment": {"start_offset": 0, -// "end_offset": 3}} -// }, -// { -// "display_name": "animal", -// "text_extraction": {"text_segment": {"start_offset": 4, -// "end_offset": 7}} -// } -// ], -// }\n -// { -// "text_snippet": { -// "content": "This dog is good." -// }, -// "annotations": [ -// { -// "display_name": "animal", -// "text_extraction": { -// "text_segment": {"start_offset": 5, "end_offset": 8} -// } -// } -// ] -// } -// Sample document JSON Lines file (presented here with artificial line -// breaks, but the only actual line break is denoted by \n).: -// { -// "document": { -// "input_config": { -// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] -// } -// } -// } -// }\n -// { -// "document": { -// "input_config": { -// "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] -// } -// } -// } -// } -// -// * For Text Classification: -// CSV file(s) with each line in format: -// ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),LABEL,LABEL,... -// TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If -// the column content is a valid gcs file path, i.e. prefixed by -// "gs://", it will be treated as a GCS_FILE_PATH, else if the content -// is enclosed within double quotes (""), it is -// treated as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path -// must lead to a .txt file with UTF-8 encoding, for example, -// "gs://folder/content.txt", and the content in it is extracted -// as a text snippet. In TEXT_SNIPPET case, the column content -// excluding quotes is treated as to be imported text snippet. In -// both cases, the text snippet/file size must be within 128kB. -// Maximum 100 unique labels are allowed per CSV row. -// Sample rows: -// TRAIN,"They have bad food and very rude",RudeService,BadFood -// TRAIN,gs://folder/content.txt,SlowService -// TEST,"Typically always bad service there.",RudeService -// VALIDATE,"Stomach ache to go.",BadFood -// -// * For Text Sentiment: -// CSV file(s) with each line in format: -// ML_USE,(TEXT_SNIPPET | GCS_FILE_PATH),SENTIMENT -// TEXT_SNIPPET and GCS_FILE_PATH are distinguished by a pattern. If -// the column content is a valid gcs file path, that is, prefixed by -// "gs://", it is treated as a GCS_FILE_PATH, otherwise it is treated -// as a TEXT_SNIPPET. In the GCS_FILE_PATH case, the path -// must lead to a .txt file with UTF-8 encoding, for example, -// "gs://folder/content.txt", and the content in it is extracted -// as a text snippet. In TEXT_SNIPPET case, the column content itself -// is treated as to be imported text snippet. In both cases, the -// text snippet must be up to 500 characters long. -// Sample rows: -// TRAIN,"@freewrytin this is way too good for your product",2 -// TRAIN,"I need this product so bad",3 -// TEST,"Thank you for this product.",4 -// VALIDATE,gs://folder/content.txt,2 -// -// * For Tables: -// Either -// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or -// -// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source] -// can be used. All inputs is concatenated into a single -// -// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_name] -// For gcs_source: -// CSV file(s), where the first row of the first file is the header, -// containing unique column names. If the first row of a subsequent -// file is the same as the header, then it is also treated as a -// header. All other rows contain values for the corresponding -// columns. -// Each .CSV file by itself must be 10GB or smaller, and their total -// size must be 100GB or smaller. -// First three sample rows of a CSV file: -// "Id","First Name","Last Name","Dob","Addresses" -// -// "1","John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" -// -// "2","Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} -// For bigquery_source: -// An URI of a BigQuery table. The user data size of the BigQuery -// table must be 100GB or smaller. -// An imported table must have between 2 and 1,000 columns, inclusive, -// and between 1000 and 100,000,000 rows, inclusive. There are at most 5 -// import data running in parallel. -// Definitions: -// ML_USE = "TRAIN" | "VALIDATE" | "TEST" | "UNASSIGNED" -// Describes how the given example (file) should be used for model -// training. "UNASSIGNED" can be used when user has no preference. -// GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/image1.png". -// LABEL = A display name of an object on an image, video etc., e.g. "dog". -// Must be up to 32 characters long and can consist only of ASCII -// Latin letters A-Z and a-z, underscores(_), and ASCII digits 0-9. -// For each label an AnnotationSpec is created which display_name -// becomes the label; AnnotationSpecs are given back in predictions. -// INSTANCE_ID = A positive integer that identifies a specific instance of a -// labeled entity on an example. Used e.g. to track two cars on -// a video while being able to tell apart which one is which. -// BOUNDING_BOX = VERTEX,VERTEX,VERTEX,VERTEX | VERTEX,,,VERTEX,, -// A rectangle parallel to the frame of the example (image, -// video). If 4 vertices are given they are connected by edges -// in the order provided, if 2 are given they are recognized -// as diagonally opposite vertices of the rectangle. -// VERTEX = COORDINATE,COORDINATE -// First coordinate is horizontal (x), the second is vertical (y). -// COORDINATE = A float in 0 to 1 range, relative to total length of -// image or video in given dimension. For fractions the -// leading non-decimal 0 can be omitted (i.e. 0.3 = .3). -// Point 0,0 is in top left. -// TIME_SEGMENT_START = TIME_OFFSET -// Expresses a beginning, inclusive, of a time segment -// within an example that has a time dimension -// (e.g. video). -// TIME_SEGMENT_END = TIME_OFFSET -// Expresses an end, exclusive, of a time segment within -// an example that has a time dimension (e.g. video). -// TIME_OFFSET = A number of seconds as measured from the start of an -// example (e.g. video). Fractions are allowed, up to a -// microsecond precision. "inf" is allowed, and it means the end -// of the example. -// TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within -// double quotes (""). -// SENTIMENT = An integer between 0 and -// Dataset.text_sentiment_dataset_metadata.sentiment_max -// (inclusive). Describes the ordinal of the sentiment - higher -// value means a more positive sentiment. All the values are -// completely relative, i.e. neither 0 needs to mean a negative or -// neutral sentiment nor sentiment_max needs to mean a positive one -// - it is just required that 0 is the least positive sentiment -// in the data, and sentiment_max is the most positive one. -// The SENTIMENT shouldn't be confused with "score" or "magnitude" -// from the previous Natural Language Sentiment Analysis API. -// All SENTIMENT values between 0 and sentiment_max must be -// represented in the imported data. On prediction the same 0 to -// sentiment_max range will be used. The difference between -// neighboring sentiment values needs not to be uniform, e.g. 1 and -// 2 may be similar whereas the difference between 2 and 3 may be -// huge. -// -// Errors: -// If any of the provided CSV files can't be parsed or if more than certain -// percent of CSV rows cannot be processed then the operation fails and -// nothing is imported. Regardless of overall success or failure the per-row -// failures, up to a certain count cap, is listed in -// Operation.metadata.partial_failures. -// -message InputConfig { - // The source of the input. - oneof source { - // The Google Cloud Storage location for the input content. - // In ImportData, the gcs_source points to a csv with structure described in - // the comment. - GcsSource gcs_source = 1; - - // The BigQuery location for the input content. - BigQuerySource bigquery_source = 3; - } - - // Additional domain-specific parameters describing the semantic of the - // imported data, any string must be up to 25000 - // characters long. - // - // * For Tables: - // `schema_inference_version` - (integer) Required. The version of the - // algorithm that should be used for the initial inference of the - // schema (columns' DataTypes) of the table the data is being imported - // into. Allowed values: "1". - map params = 2; -} - -// Input configuration for BatchPredict Action. -// -// The format of input depends on the ML problem of the model used for -// prediction. As input source the -// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] -// is expected, unless specified otherwise. -// -// The formats are represented in EBNF with commas being literal and with -// non-terminal symbols defined near the end of this comment. The formats -// are: -// -// * For Image Classification: -// CSV file(s) with each line having just a single column: -// GCS_FILE_PATH -// which leads to image of up to 30MB in size. Supported -// extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in -// the Batch predict output. -// Three sample rows: -// gs://folder/image1.jpeg -// gs://folder/image2.gif -// gs://folder/image3.png -// -// * For Image Object Detection: -// CSV file(s) with each line having just a single column: -// GCS_FILE_PATH -// which leads to image of up to 30MB in size. Supported -// extensions: .JPEG, .GIF, .PNG. This path is treated as the ID in -// the Batch predict output. -// Three sample rows: -// gs://folder/image1.jpeg -// gs://folder/image2.gif -// gs://folder/image3.png -// * For Video Classification: -// CSV file(s) with each line in format: -// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END -// GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h -// duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. -// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the -// length of the video, and end has to be after the start. -// Three sample rows: -// gs://folder/video1.mp4,10,40 -// gs://folder/video1.mp4,20,60 -// gs://folder/vid2.mov,0,inf -// -// * For Video Object Tracking: -// CSV file(s) with each line in format: -// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END -// GCS_FILE_PATH leads to video of up to 50GB in size and up to 3h -// duration. Supported extensions: .MOV, .MPEG4, .MP4, .AVI. -// TIME_SEGMENT_START and TIME_SEGMENT_END must be within the -// length of the video, and end has to be after the start. -// Three sample rows: -// gs://folder/video1.mp4,10,240 -// gs://folder/video1.mp4,300,360 -// gs://folder/vid2.mov,0,inf -// * For Text Classification: -// CSV file(s) with each line having just a single column: -// GCS_FILE_PATH | TEXT_SNIPPET -// Any given text file can have size upto 128kB. -// Any given text snippet content must have 60,000 characters or less. -// Three sample rows: -// gs://folder/text1.txt -// "Some text content to predict" -// gs://folder/text3.pdf -// Supported file extensions: .txt, .pdf -// -// * For Text Sentiment: -// CSV file(s) with each line having just a single column: -// GCS_FILE_PATH | TEXT_SNIPPET -// Any given text file can have size upto 128kB. -// Any given text snippet content must have 500 characters or less. -// Three sample rows: -// gs://folder/text1.txt -// "Some text content to predict" -// gs://folder/text3.pdf -// Supported file extensions: .txt, .pdf -// -// * For Text Extraction -// .JSONL (i.e. JSON Lines) file(s) which either provide text in-line or -// as documents (for a single BatchPredict call only one of the these -// formats may be used). -// The in-line .JSONL file(s) contain per line a proto that -// wraps a temporary user-assigned TextSnippet ID (string up to 2000 -// characters long) called "id", a TextSnippet proto (in -// json representation) and zero or more TextFeature protos. Any given -// text snippet content must have 30,000 characters or less, and also -// be UTF-8 NFC encoded (ASCII already is). The IDs provided should be -// unique. -// The document .JSONL file(s) contain, per line, a proto that wraps a -// Document proto with input_config set. Only PDF documents are -// supported now, and each document must be up to 2MB large. -// Any given .JSONL file must be 100MB or smaller, and no more than 20 -// files may be given. -// Sample in-line JSON Lines file (presented here with artificial line -// breaks, but the only actual line break is denoted by \n): -// { -// "id": "my_first_id", -// "text_snippet": { "content": "dog car cat"}, -// "text_features": [ -// { -// "text_segment": {"start_offset": 4, "end_offset": 6}, -// "structural_type": PARAGRAPH, -// "bounding_poly": { -// "normalized_vertices": [ -// {"x": 0.1, "y": 0.1}, -// {"x": 0.1, "y": 0.3}, -// {"x": 0.3, "y": 0.3}, -// {"x": 0.3, "y": 0.1}, -// ] -// }, -// } -// ], -// }\n -// { -// "id": "2", -// "text_snippet": { -// "content": "An elaborate content", -// "mime_type": "text/plain" -// } -// } -// Sample document JSON Lines file (presented here with artificial line -// breaks, but the only actual line break is denoted by \n).: -// { -// "document": { -// "input_config": { -// "gcs_source": { "input_uris": [ "gs://folder/document1.pdf" ] -// } -// } -// } -// }\n -// { -// "document": { -// "input_config": { -// "gcs_source": { "input_uris": [ "gs://folder/document2.pdf" ] -// } -// } -// } -// } -// -// * For Tables: -// Either -// [gcs_source][google.cloud.automl.v1beta1.InputConfig.gcs_source] or -// -// [bigquery_source][google.cloud.automl.v1beta1.InputConfig.bigquery_source]. -// GCS case: -// CSV file(s), each by itself 10GB or smaller and total size must be -// 100GB or smaller, where first file must have a header containing -// column names. If the first row of a subsequent file is the same as -// the header, then it is also treated as a header. All other rows -// contain values for the corresponding columns. -// The column names must contain the model's -// -// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] -// -// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// (order doesn't matter). The columns corresponding to the model's -// input feature column specs must contain values compatible with the -// column spec's data types. Prediction on all the rows, i.e. the CSV -// lines, will be attempted. For FORECASTING -// -// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// all columns having -// -// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] -// type will be ignored. -// First three sample rows of a CSV file: -// "First Name","Last Name","Dob","Addresses" -// -// "John","Doe","1968-01-22","[{"status":"current","address":"123_First_Avenue","city":"Seattle","state":"WA","zip":"11111","numberOfYears":"1"},{"status":"previous","address":"456_Main_Street","city":"Portland","state":"OR","zip":"22222","numberOfYears":"5"}]" -// -// "Jane","Doe","1980-10-16","[{"status":"current","address":"789_Any_Avenue","city":"Albany","state":"NY","zip":"33333","numberOfYears":"2"},{"status":"previous","address":"321_Main_Street","city":"Hoboken","state":"NJ","zip":"44444","numberOfYears":"3"}]} -// BigQuery case: -// An URI of a BigQuery table. The user data size of the BigQuery -// table must be 100GB or smaller. -// The column names must contain the model's -// -// [input_feature_column_specs'][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] -// -// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// (order doesn't matter). The columns corresponding to the model's -// input feature column specs must contain values compatible with the -// column spec's data types. Prediction on all the rows of the table -// will be attempted. For FORECASTING -// -// [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// all columns having -// -// [TIME_SERIES_AVAILABLE_PAST_ONLY][google.cloud.automl.v1beta1.ColumnSpec.ForecastingMetadata.ColumnType] -// type will be ignored. -// -// Definitions: -// GCS_FILE_PATH = A path to file on GCS, e.g. "gs://folder/video.avi". -// TEXT_SNIPPET = A content of a text snippet, UTF-8 encoded, enclosed within -// double quotes ("") -// TIME_SEGMENT_START = TIME_OFFSET -// Expresses a beginning, inclusive, of a time segment -// within an -// example that has a time dimension (e.g. video). -// TIME_SEGMENT_END = TIME_OFFSET -// Expresses an end, exclusive, of a time segment within -// an example that has a time dimension (e.g. video). -// TIME_OFFSET = A number of seconds as measured from the start of an -// example (e.g. video). Fractions are allowed, up to a -// microsecond precision. "inf" is allowed and it means the end -// of the example. -// -// Errors: -// If any of the provided CSV files can't be parsed or if more than certain -// percent of CSV rows cannot be processed then the operation fails and -// prediction does not happen. Regardless of overall success or failure the -// per-row failures, up to a certain count cap, will be listed in -// Operation.metadata.partial_failures. -message BatchPredictInputConfig { - // Required. The source of the input. - oneof source { - // The Google Cloud Storage location for the input content. - GcsSource gcs_source = 1; - - // The BigQuery location for the input content. - BigQuerySource bigquery_source = 2; - } -} - -// Input configuration of a [Document][google.cloud.automl.v1beta1.Document]. -message DocumentInputConfig { - // The Google Cloud Storage location of the document file. Only a single path - // should be given. - // Max supported size: 512MB. - // Supported extensions: .PDF. - GcsSource gcs_source = 1; -} - -// * For Translation: -// CSV file `translation.csv`, with each line in format: -// ML_USE,GCS_FILE_PATH -// GCS_FILE_PATH leads to a .TSV file which describes examples that have -// given ML_USE, using the following row format per line: -// TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target -// language) -// -// * For Tables: -// Output depends on whether the dataset was imported from GCS or -// BigQuery. -// GCS case: -// -// [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination] -// must be set. Exported are CSV file(s) `tables_1.csv`, -// `tables_2.csv`,...,`tables_N.csv` with each having as header line -// the table's column names, and all other lines contain values for -// the header columns. -// BigQuery case: -// -// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination] -// pointing to a BigQuery project must be set. In the given project a -// new dataset will be created with name -// -// `export_data__` -// where will be made -// BigQuery-dataset-name compatible (e.g. most special characters will -// become underscores), and timestamp will be in -// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that -// dataset a new table called `primary_table` will be created, and -// filled with precisely the same data as this obtained on import. -message OutputConfig { - // Required. The destination of the output. - oneof destination { - // The Google Cloud Storage location where the output is to be written to. - // For Image Object Detection, Text Extraction, Video Classification and - // Tables, in the given directory a new directory will be created with name: - // export_data-- where - // timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export - // output will be written into that directory. - GcsDestination gcs_destination = 1; - - // The BigQuery location where the output is to be written to. - BigQueryDestination bigquery_destination = 2; - } -} - -// Output configuration for BatchPredict Action. -// -// As destination the -// -// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination] -// must be set unless specified otherwise for a domain. If gcs_destination is -// set then in the given directory a new directory is created. Its name -// will be -// "prediction--", -// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. The contents -// of it depends on the ML problem the predictions are made for. -// -// * For Image Classification: -// In the created directory files `image_classification_1.jsonl`, -// `image_classification_2.jsonl`,...,`image_classification_N.jsonl` -// will be created, where N may be 1, and depends on the -// total number of the successfully predicted images and annotations. -// A single image will be listed only once with all its annotations, -// and its annotations will never be split across files. -// Each .JSONL file will contain, per line, a JSON representation of a -// proto that wraps image's "ID" : "" followed by a list of -// zero or more AnnotationPayload protos (called annotations), which -// have classification detail populated. -// If prediction for any image failed (partially or completely), then an -// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` -// files will be created (N depends on total number of failed -// predictions). These files will have a JSON representation of a proto -// that wraps the same "ID" : "" but here followed by -// exactly one -// -// [`google.rpc.Status`](https: -// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) -// containing only `code` and `message`fields. -// -// * For Image Object Detection: -// In the created directory files `image_object_detection_1.jsonl`, -// `image_object_detection_2.jsonl`,...,`image_object_detection_N.jsonl` -// will be created, where N may be 1, and depends on the -// total number of the successfully predicted images and annotations. -// Each .JSONL file will contain, per line, a JSON representation of a -// proto that wraps image's "ID" : "" followed by a list of -// zero or more AnnotationPayload protos (called annotations), which -// have image_object_detection detail populated. A single image will -// be listed only once with all its annotations, and its annotations -// will never be split across files. -// If prediction for any image failed (partially or completely), then -// additional `errors_1.jsonl`, `errors_2.jsonl`,..., `errors_N.jsonl` -// files will be created (N depends on total number of failed -// predictions). These files will have a JSON representation of a proto -// that wraps the same "ID" : "" but here followed by -// exactly one -// -// [`google.rpc.Status`](https: -// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) -// containing only `code` and `message`fields. -// * For Video Classification: -// In the created directory a video_classification.csv file, and a .JSON -// file per each video classification requested in the input (i.e. each -// line in given CSV(s)), will be created. -// -// The format of video_classification.csv is: -// -// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS -// where: -// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 -// the prediction input lines (i.e. video_classification.csv has -// precisely the same number of lines as the prediction input had.) -// JSON_FILE_NAME = Name of .JSON file in the output directory, which -// contains prediction responses for the video time segment. -// STATUS = "OK" if prediction completed successfully, or an error code -// with message otherwise. If STATUS is not "OK" then the .JSON file -// for that line may not exist or be empty. -// -// Each .JSON file, assuming STATUS is "OK", will contain a list of -// AnnotationPayload protos in JSON format, which are the predictions -// for the video time segment the file is assigned to in the -// video_classification.csv. All AnnotationPayload protos will have -// video_classification field set, and will be sorted by -// video_classification.type field (note that the returned types are -// governed by `classifaction_types` parameter in -// [PredictService.BatchPredictRequest.params][]). -// -// * For Video Object Tracking: -// In the created directory a video_object_tracking.csv file will be -// created, and multiple files video_object_trackinng_1.json, -// video_object_trackinng_2.json,..., video_object_trackinng_N.json, -// where N is the number of requests in the input (i.e. the number of -// lines in given CSV(s)). -// -// The format of video_object_tracking.csv is: -// -// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END,JSON_FILE_NAME,STATUS -// where: -// GCS_FILE_PATH,TIME_SEGMENT_START,TIME_SEGMENT_END = matches 1 to 1 -// the prediction input lines (i.e. video_object_tracking.csv has -// precisely the same number of lines as the prediction input had.) -// JSON_FILE_NAME = Name of .JSON file in the output directory, which -// contains prediction responses for the video time segment. -// STATUS = "OK" if prediction completed successfully, or an error -// code with message otherwise. If STATUS is not "OK" then the .JSON -// file for that line may not exist or be empty. -// -// Each .JSON file, assuming STATUS is "OK", will contain a list of -// AnnotationPayload protos in JSON format, which are the predictions -// for each frame of the video time segment the file is assigned to in -// video_object_tracking.csv. All AnnotationPayload protos will have -// video_object_tracking field set. -// * For Text Classification: -// In the created directory files `text_classification_1.jsonl`, -// `text_classification_2.jsonl`,...,`text_classification_N.jsonl` -// will be created, where N may be 1, and depends on the -// total number of inputs and annotations found. -// -// Each .JSONL file will contain, per line, a JSON representation of a -// proto that wraps input text snippet or input text file and a list of -// zero or more AnnotationPayload protos (called annotations), which -// have classification detail populated. A single text snippet or file -// will be listed only once with all its annotations, and its -// annotations will never be split across files. -// -// If prediction for any text snippet or file failed (partially or -// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., -// `errors_N.jsonl` files will be created (N depends on total number of -// failed predictions). These files will have a JSON representation of a -// proto that wraps input text snippet or input text file followed by -// exactly one -// -// [`google.rpc.Status`](https: -// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) -// containing only `code` and `message`. -// -// * For Text Sentiment: -// In the created directory files `text_sentiment_1.jsonl`, -// `text_sentiment_2.jsonl`,...,`text_sentiment_N.jsonl` -// will be created, where N may be 1, and depends on the -// total number of inputs and annotations found. -// -// Each .JSONL file will contain, per line, a JSON representation of a -// proto that wraps input text snippet or input text file and a list of -// zero or more AnnotationPayload protos (called annotations), which -// have text_sentiment detail populated. A single text snippet or file -// will be listed only once with all its annotations, and its -// annotations will never be split across files. -// -// If prediction for any text snippet or file failed (partially or -// completely), then additional `errors_1.jsonl`, `errors_2.jsonl`,..., -// `errors_N.jsonl` files will be created (N depends on total number of -// failed predictions). These files will have a JSON representation of a -// proto that wraps input text snippet or input text file followed by -// exactly one -// -// [`google.rpc.Status`](https: -// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) -// containing only `code` and `message`. -// -// * For Text Extraction: -// In the created directory files `text_extraction_1.jsonl`, -// `text_extraction_2.jsonl`,...,`text_extraction_N.jsonl` -// will be created, where N may be 1, and depends on the -// total number of inputs and annotations found. -// The contents of these .JSONL file(s) depend on whether the input -// used inline text, or documents. -// If input was inline, then each .JSONL file will contain, per line, -// a JSON representation of a proto that wraps given in request text -// snippet's "id" (if specified), followed by input text snippet, -// and a list of zero or more -// AnnotationPayload protos (called annotations), which have -// text_extraction detail populated. A single text snippet will be -// listed only once with all its annotations, and its annotations will -// never be split across files. -// If input used documents, then each .JSONL file will contain, per -// line, a JSON representation of a proto that wraps given in request -// document proto, followed by its OCR-ed representation in the form -// of a text snippet, finally followed by a list of zero or more -// AnnotationPayload protos (called annotations), which have -// text_extraction detail populated and refer, via their indices, to -// the OCR-ed text snippet. A single document (and its text snippet) -// will be listed only once with all its annotations, and its -// annotations will never be split across files. -// If prediction for any text snippet failed (partially or completely), -// then additional `errors_1.jsonl`, `errors_2.jsonl`,..., -// `errors_N.jsonl` files will be created (N depends on total number of -// failed predictions). These files will have a JSON representation of a -// proto that wraps either the "id" : "" (in case of inline) -// or the document proto (in case of document) but here followed by -// exactly one -// -// [`google.rpc.Status`](https: -// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) -// containing only `code` and `message`. -// -// * For Tables: -// Output depends on whether -// -// [gcs_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.gcs_destination] -// or -// -// [bigquery_destination][google.cloud.automl.v1beta1.BatchPredictOutputConfig.bigquery_destination] -// is set (either is allowed). -// GCS case: -// In the created directory files `tables_1.csv`, `tables_2.csv`,..., -// `tables_N.csv` will be created, where N may be 1, and depends on -// the total number of the successfully predicted rows. -// For all CLASSIFICATION -// -// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// Each .csv file will contain a header, listing all columns' -// -// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// given on input followed by M target column names in the format of -// -// "<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] -// -// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>__score" where M is the number of distinct target values, -// i.e. number of distinct values in the target column of the table -// used to train the model. Subsequent lines will contain the -// respective values of successfully predicted rows, with the last, -// i.e. the target, columns having the corresponding prediction -// [scores][google.cloud.automl.v1beta1.TablesAnnotation.score]. -// For REGRESSION and FORECASTING -// -// [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]: -// Each .csv file will contain a header, listing all columns' -// [display_name-s][google.cloud.automl.v1beta1.display_name] given -// on input followed by the predicted target column with name in the -// format of -// -// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] -// -// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>" -// Subsequent lines will contain the respective values of -// successfully predicted rows, with the last, i.e. the target, -// column having the predicted target value. -// If prediction for any rows failed, then an additional -// `errors_1.csv`, `errors_2.csv`,..., `errors_N.csv` will be -// created (N depends on total number of failed rows). These files -// will have analogous format as `tables_*.csv`, but always with a -// single target column having -// -// [`google.rpc.Status`](https: -// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) -// represented as a JSON string, and containing only `code` and -// `message`. -// BigQuery case: -// -// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination] -// pointing to a BigQuery project must be set. In the given project a -// new dataset will be created with name -// `prediction__` -// where will be made -// BigQuery-dataset-name compatible (e.g. most special characters will -// become underscores), and timestamp will be in -// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset -// two tables will be created, `predictions`, and `errors`. -// The `predictions` table's column names will be the input columns' -// -// [display_name-s][google.cloud.automl.v1beta1.ColumnSpec.display_name] -// followed by the target column with name in the format of -// -// "predicted_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] -// -// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>" -// The input feature columns will contain the respective values of -// successfully predicted rows, with the target column having an -// ARRAY of -// -// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload], -// represented as STRUCT-s, containing -// [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation]. -// The `errors` table contains rows for which the prediction has -// failed, it has analogous input columns while the target column name -// is in the format of -// -// "errors_<[target_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] -// -// [display_name][google.cloud.automl.v1beta1.ColumnSpec.display_name]>", -// and as a value has -// -// [`google.rpc.Status`](https: -// //github.com/googleapis/googleapis/blob/master/google/rpc/status.proto) -// represented as a STRUCT, and containing only `code` and `message`. -message BatchPredictOutputConfig { - // Required. The destination of the output. - oneof destination { - // The Google Cloud Storage location of the directory where the output is to - // be written to. - GcsDestination gcs_destination = 1; - - // The BigQuery location where the output is to be written to. - BigQueryDestination bigquery_destination = 2; - } -} - -// Output configuration for ModelExport Action. -message ModelExportOutputConfig { - // Required. The destination of the output. - oneof destination { - // The Google Cloud Storage location where the model is to be written to. - // This location may only be set for the following model formats: - // "tflite", "edgetpu_tflite", "tf_saved_model", "tf_js", "core_ml". - // - // 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. - GcsDestination gcs_destination = 1; - - // The GCR location where model image is to be pushed to. This location - // may only be set for the following model formats: - // "docker". - // - // The model image will be created under the given URI. - GcrDestination gcr_destination = 3; - } - - // The format in which the model must be exported. The available, and default, - // formats depend on the problem and model type (if given problem and type - // combination doesn't have a format listed, it means its models are not - // exportable): - // - // * For Image Classification mobile-low-latency-1, mobile-versatile-1, - // mobile-high-accuracy-1: - // "tflite" (default), "edgetpu_tflite", "tf_saved_model", "tf_js", - // "docker". - // - // * For Image Classification mobile-core-ml-low-latency-1, - // mobile-core-ml-versatile-1, mobile-core-ml-high-accuracy-1: - // "core_ml" (default). - // Formats description: - // - // * 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. - // * docker - Used for Docker containers. Use the params field to customize - // the container. The container is verified to work correctly on - // ubuntu 16.04 operating system. See more at - // [containers - // - // quickstart](https: - // //cloud.google.com/vision/automl/docs/containers-gcs-quickstart) - // * core_ml - Used for iOS mobile devices. - string model_format = 4; - - // Additional model-type and format specific parameters describing the - // requirements for the to be exported model files, any string must be up to - // 25000 characters long. - // - // * For `docker` format: - // `cpu_architecture` - (string) "x86_64" (default). - // `gpu_architecture` - (string) "none" (default), "nvidia". - map params = 2; -} - -// Output configuration for ExportEvaluatedExamples Action. Note that this call -// is available only for 30 days since the moment the model was evaluated. -// The output depends on the domain, as follows (note that only examples from -// the TEST set are exported): -// -// * For Tables: -// -// [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination] -// pointing to a BigQuery project must be set. In the given project a -// new dataset will be created with name -// -// `export_evaluated_examples__` -// where will be made BigQuery-dataset-name -// compatible (e.g. most special characters will become underscores), -// and timestamp will be in YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" -// format. In the dataset an `evaluated_examples` table will be -// created. It will have all the same columns as the -// -// [primary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id] -// of the -// [dataset][google.cloud.automl.v1beta1.Model.dataset_id] from which -// the model was created, as they were at the moment of model's -// evaluation (this includes the target column with its ground -// truth), followed by a column called "predicted_". That -// last column will contain the model's prediction result for each -// respective row, given as ARRAY of -// [AnnotationPayloads][google.cloud.automl.v1beta1.AnnotationPayload], -// represented as STRUCT-s, containing -// [TablesAnnotation][google.cloud.automl.v1beta1.TablesAnnotation]. -message ExportEvaluatedExamplesOutputConfig { - // Required. The destination of the output. - oneof destination { - // The BigQuery location where the output is to be written to. - BigQueryDestination bigquery_destination = 2; - } -} - -// The Google Cloud Storage location for the input content. -message GcsSource { - // Required. Google Cloud Storage URIs to input files, up to 2000 characters - // long. Accepted forms: - // * Full object path, e.g. gs://bucket/directory/object.csv - repeated string input_uris = 1; -} - -// The BigQuery location for the input content. -message BigQuerySource { - // Required. BigQuery URI to a table, up to 2000 characters long. - // Accepted forms: - // * BigQuery path e.g. bq://projectId.bqDatasetId.bqTableId - string input_uri = 1; -} - -// The Google Cloud Storage location where the output is to be written to. -message GcsDestination { - // Required. Google Cloud Storage URI to output directory, up to 2000 - // characters long. - // Accepted forms: - // * Prefix path: gs://bucket/directory - // The requesting user must have write permission to the bucket. - // The directory is created if it doesn't exist. - string output_uri_prefix = 1; -} - -// The BigQuery location for the output content. -message BigQueryDestination { - // Required. BigQuery URI to a project, up to 2000 characters long. - // Accepted forms: - // * BigQuery path e.g. bq://projectId - string output_uri = 1; -} - -// The GCR location where the image must be pushed to. -message GcrDestination { - // Required. Google Contained Registry URI of the new image, up to 2000 - // characters long. See - // - // https: - // //cloud.google.com/container-registry/do - // // cs/pushing-and-pulling#pushing_an_image_to_a_registry - // Accepted forms: - // * [HOSTNAME]/[PROJECT-ID]/[IMAGE] - // * [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG] - // - // The requesting user must have permission to push images the project. - string output_uri = 1; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/model.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/model.proto deleted file mode 100644 index 2b2e8d73f..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/model.proto +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/image.proto"; -import "google/cloud/automl/v1beta1/tables.proto"; -import "google/cloud/automl/v1beta1/text.proto"; -import "google/cloud/automl/v1beta1/translation.proto"; -import "google/cloud/automl/v1beta1/video.proto"; -import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// API proto representing a trained machine learning model. -message Model { - option (google.api.resource) = { - type: "automl.googleapis.com/Model" - pattern: "projects/{project}/locations/{location}/models/{model}" - }; - - // Deployment state of the model. - enum DeploymentState { - // Should not be used, an un-set enum has this value by default. - DEPLOYMENT_STATE_UNSPECIFIED = 0; - - // Model is deployed. - DEPLOYED = 1; - - // Model is not deployed. - UNDEPLOYED = 2; - } - - // Required. - // The model metadata that is specific to the problem type. - // Must match the metadata type of the dataset used to train the model. - oneof model_metadata { - // Metadata for translation models. - TranslationModelMetadata translation_model_metadata = 15; - - // Metadata for image classification models. - ImageClassificationModelMetadata image_classification_model_metadata = 13; - - // Metadata for text classification models. - TextClassificationModelMetadata text_classification_model_metadata = 14; - - // Metadata for image object detection models. - ImageObjectDetectionModelMetadata image_object_detection_model_metadata = 20; - - // Metadata for video classification models. - VideoClassificationModelMetadata video_classification_model_metadata = 23; - - // Metadata for video object tracking models. - VideoObjectTrackingModelMetadata video_object_tracking_model_metadata = 21; - - // Metadata for text extraction models. - TextExtractionModelMetadata text_extraction_model_metadata = 19; - - // Metadata for Tables models. - TablesModelMetadata tables_model_metadata = 24; - - // Metadata for text sentiment models. - TextSentimentModelMetadata text_sentiment_model_metadata = 22; - } - - // Output only. Resource name of the model. - // Format: `projects/{project_id}/locations/{location_id}/models/{model_id}` - string name = 1; - - // Required. The name of the model to show in the interface. The name can be - // up to 32 characters long and can consist only of ASCII Latin letters A-Z - // and a-z, underscores - // (_), and ASCII digits 0-9. It must start with a letter. - string display_name = 2; - - // Required. The resource ID of the dataset used to create the model. The dataset must - // come from the same ancestor project and location. - string dataset_id = 3; - - // Output only. Timestamp when the model training finished and can be used for prediction. - google.protobuf.Timestamp create_time = 7; - - // Output only. Timestamp when this model was last updated. - google.protobuf.Timestamp update_time = 11; - - // Output only. Deployment state of the model. A model can only serve - // prediction requests after it gets deployed. - DeploymentState deployment_state = 8; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/model_evaluation.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/model_evaluation.proto deleted file mode 100644 index d5633fcdf..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/model_evaluation.proto +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/classification.proto"; -import "google/cloud/automl/v1beta1/detection.proto"; -import "google/cloud/automl/v1beta1/regression.proto"; -import "google/cloud/automl/v1beta1/tables.proto"; -import "google/cloud/automl/v1beta1/text_extraction.proto"; -import "google/cloud/automl/v1beta1/text_sentiment.proto"; -import "google/cloud/automl/v1beta1/translation.proto"; -import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Evaluation results of a model. -message ModelEvaluation { - option (google.api.resource) = { - type: "automl.googleapis.com/ModelEvaluation" - pattern: "projects/{project}/locations/{location}/models/{model}/modelEvaluations/{model_evaluation}" - }; - - // Output only. Problem type specific evaluation metrics. - oneof metrics { - // Model evaluation metrics for image, text, video and tables - // classification. - // Tables problem is considered a classification when the target column - // is CATEGORY DataType. - ClassificationEvaluationMetrics classification_evaluation_metrics = 8; - - // Model evaluation metrics for Tables regression. - // Tables problem is considered a regression when the target column - // has FLOAT64 DataType. - RegressionEvaluationMetrics regression_evaluation_metrics = 24; - - // Model evaluation metrics for translation. - TranslationEvaluationMetrics translation_evaluation_metrics = 9; - - // Model evaluation metrics for image object detection. - ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; - - // Model evaluation metrics for video object tracking. - VideoObjectTrackingEvaluationMetrics video_object_tracking_evaluation_metrics = 14; - - // Evaluation metrics for text sentiment models. - TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; - - // Evaluation metrics for text extraction models. - TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; - } - - // Output only. Resource name of the model evaluation. - // Format: - // - // `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` - string name = 1; - - // Output only. The ID of the annotation spec that the model evaluation applies to. The - // The ID is empty for the overall model evaluation. - // For Tables annotation specs in the dataset do not exist and this ID is - // always not set, but for CLASSIFICATION - // - // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - // the - // [display_name][google.cloud.automl.v1beta1.ModelEvaluation.display_name] - // field is used. - string annotation_spec_id = 2; - - // Output only. The value of - // [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] at - // the moment when the model was trained. Because this field returns a value - // at model training time, for different models trained from the same dataset, - // the values may differ, since display names could had been changed between - // the two model's trainings. - // For Tables CLASSIFICATION - // - // [prediction_type-s][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type] - // distinct values of the target column at the moment of the model evaluation - // are populated here. - // The display_name is empty for the overall model evaluation. - string display_name = 15; - - // Output only. Timestamp when this model evaluation was created. - google.protobuf.Timestamp create_time = 5; - - // Output only. The number of examples used for model evaluation, i.e. for - // which ground truth from time of model creation is compared against the - // predicted annotations created by the model. - // For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is - // the total number of all examples used for evaluation. - // Otherwise, this is the count of examples that according to the ground - // truth were annotated by the - // - // [annotation_spec_id][google.cloud.automl.v1beta1.ModelEvaluation.annotation_spec_id]. - int32 evaluated_example_count = 6; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/operations.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/operations.proto deleted file mode 100644 index cce3fedc5..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/operations.proto +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/io.proto"; -import "google/cloud/automl/v1beta1/model.proto"; -import "google/cloud/automl/v1beta1/model_evaluation.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Metadata used across all long running operations returned by AutoML API. -message OperationMetadata { - // Ouptut only. Details of specific operation. Even if this field is empty, - // the presence allows to distinguish different types of operations. - oneof details { - // Details of a Delete operation. - DeleteOperationMetadata delete_details = 8; - - // Details of a DeployModel operation. - DeployModelOperationMetadata deploy_model_details = 24; - - // Details of an UndeployModel operation. - UndeployModelOperationMetadata undeploy_model_details = 25; - - // Details of CreateModel operation. - CreateModelOperationMetadata create_model_details = 10; - - // Details of ImportData operation. - ImportDataOperationMetadata import_data_details = 15; - - // Details of BatchPredict operation. - BatchPredictOperationMetadata batch_predict_details = 16; - - // Details of ExportData operation. - ExportDataOperationMetadata export_data_details = 21; - - // Details of ExportModel operation. - ExportModelOperationMetadata export_model_details = 22; - - // Details of ExportEvaluatedExamples operation. - ExportEvaluatedExamplesOperationMetadata export_evaluated_examples_details = 26; - } - - // Output only. Progress of operation. Range: [0, 100]. - // Not used currently. - int32 progress_percent = 13; - - // Output only. Partial failures encountered. - // E.g. single files that couldn't be read. - // This field should never exceed 20 entries. - // Status details field will contain standard GCP error details. - repeated google.rpc.Status partial_failures = 2; - - // Output only. Time when the operation was created. - google.protobuf.Timestamp create_time = 3; - - // Output only. Time when the operation was updated for the last time. - google.protobuf.Timestamp update_time = 4; -} - -// Details of operations that perform deletes of any entities. -message DeleteOperationMetadata { - -} - -// Details of DeployModel operation. -message DeployModelOperationMetadata { - -} - -// Details of UndeployModel operation. -message UndeployModelOperationMetadata { - -} - -// Details of CreateModel operation. -message CreateModelOperationMetadata { - -} - -// Details of ImportData operation. -message ImportDataOperationMetadata { - -} - -// Details of ExportData operation. -message ExportDataOperationMetadata { - // Further describes this export data's output. - // Supplements - // [OutputConfig][google.cloud.automl.v1beta1.OutputConfig]. - message ExportDataOutputInfo { - // The output location to which the exported data is written. - oneof output_location { - // The full path of the Google Cloud Storage directory created, into which - // the exported data is written. - string gcs_output_directory = 1; - - // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - // format, into which the exported data is written. - string bigquery_output_dataset = 2; - } - } - - // Output only. Information further describing this export data's output. - ExportDataOutputInfo output_info = 1; -} - -// Details of BatchPredict operation. -message BatchPredictOperationMetadata { - // Further describes this batch predict's output. - // Supplements - // - // [BatchPredictOutputConfig][google.cloud.automl.v1beta1.BatchPredictOutputConfig]. - message BatchPredictOutputInfo { - // The output location into which prediction output is written. - oneof output_location { - // The full path of the Google Cloud Storage directory created, into which - // the prediction output is written. - string gcs_output_directory = 1; - - // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - // format, into which the prediction output is written. - string bigquery_output_dataset = 2; - } - } - - // Output only. The input config that was given upon starting this - // batch predict operation. - BatchPredictInputConfig input_config = 1; - - // Output only. Information further describing this batch predict's output. - BatchPredictOutputInfo output_info = 2; -} - -// Details of ExportModel operation. -message ExportModelOperationMetadata { - // Further describes the output of model export. - // Supplements - // - // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - message ExportModelOutputInfo { - // The full path of the Google Cloud Storage directory created, into which - // the model will be exported. - string gcs_output_directory = 1; - } - - // Output only. Information further describing the output of this model - // export. - ExportModelOutputInfo output_info = 2; -} - -// Details of EvaluatedExamples operation. -message ExportEvaluatedExamplesOperationMetadata { - // Further describes the output of the evaluated examples export. - // Supplements - // - // [ExportEvaluatedExamplesOutputConfig][google.cloud.automl.v1beta1.ExportEvaluatedExamplesOutputConfig]. - message ExportEvaluatedExamplesOutputInfo { - // The path of the BigQuery dataset created, in bq://projectId.bqDatasetId - // format, into which the output of export evaluated examples is written. - string bigquery_output_dataset = 2; - } - - // Output only. Information further describing the output of this evaluated - // examples export. - ExportEvaluatedExamplesOutputInfo output_info = 2; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/prediction_service.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/prediction_service.proto deleted file mode 100644 index 0bcf685e0..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/prediction_service.proto +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/annotation_payload.proto"; -import "google/cloud/automl/v1beta1/data_items.proto"; -import "google/cloud/automl/v1beta1/io.proto"; -import "google/cloud/automl/v1beta1/operations.proto"; -import "google/longrunning/operations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "PredictionServiceProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// AutoML Prediction API. -// -// On any input that is documented to expect a string parameter in -// snake_case or kebab-case, either of those cases is accepted. -service PredictionService { - option (google.api.default_host) = "automl.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Perform an online prediction. The prediction result will be directly - // returned in the response. - // Available for following ML problems, and their expected request payloads: - // * Image Classification - Image in .JPEG, .GIF or .PNG format, image_bytes - // up to 30MB. - // * Image Object Detection - Image in .JPEG, .GIF or .PNG format, image_bytes - // up to 30MB. - // * Text Classification - TextSnippet, content up to 60,000 characters, - // UTF-8 encoded. - // * Text Extraction - TextSnippet, content up to 30,000 characters, - // UTF-8 NFC encoded. - // * Translation - TextSnippet, content up to 25,000 characters, UTF-8 - // encoded. - // * Tables - Row, with column values matching the columns of the model, - // up to 5MB. Not available for FORECASTING - // - // [prediction_type][google.cloud.automl.v1beta1.TablesModelMetadata.prediction_type]. - // * Text Sentiment - TextSnippet, content up 500 characters, UTF-8 - // encoded. - rpc Predict(PredictRequest) returns (PredictResponse) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/models/*}:predict" - body: "*" - }; - option (google.api.method_signature) = "name,payload,params"; - } - - // Perform a batch prediction. Unlike the online [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch - // prediction result won't be immediately available in the response. Instead, - // a long running operation object is returned. User can poll the operation - // result via [GetOperation][google.longrunning.Operations.GetOperation] - // method. Once the operation is done, [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in - // the [response][google.longrunning.Operation.response] field. - // Available for following ML problems: - // * Image Classification - // * Image Object Detection - // * Video Classification - // * Video Object Tracking * Text Extraction - // * Tables - rpc BatchPredict(BatchPredictRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/models/*}:batchPredict" - body: "*" - }; - option (google.api.method_signature) = "name,input_config,output_config,params"; - option (google.longrunning.operation_info) = { - response_type: "BatchPredictResult" - metadata_type: "OperationMetadata" - }; - } -} - -// Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict]. -message PredictRequest { - // Required. Name of the model requested to serve the prediction. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; - - // Required. Payload to perform a prediction on. The payload must match the - // problem type that the model was trained to solve. - ExamplePayload payload = 2 [(google.api.field_behavior) = REQUIRED]; - - // Additional domain-specific parameters, any string must be up to 25000 - // characters long. - // - // * For Image Classification: - // - // `score_threshold` - (float) A value from 0.0 to 1.0. When the model - // makes predictions for an image, it will only produce results that have - // at least this confidence score. The default is 0.5. - // - // * For Image Object Detection: - // `score_threshold` - (float) When Model detects objects on the image, - // it will only produce bounding boxes which have at least this - // confidence score. Value in 0 to 1 range, default is 0.5. - // `max_bounding_box_count` - (int64) No more than this number of bounding - // boxes will be returned in the response. Default is 100, the - // requested value may be limited by server. - // * For Tables: - // feature_importance - (boolean) Whether feature importance - // should be populated in the returned TablesAnnotation. - // The default is false. - map params = 3; -} - -// Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict]. -message PredictResponse { - // Prediction result. - // Translation and Text Sentiment will return precisely one payload. - repeated AnnotationPayload payload = 1; - - // The preprocessed example that AutoML actually makes prediction on. - // Empty if AutoML does not preprocess the input example. - // * For Text Extraction: - // If the input is a .pdf file, the OCR'ed text will be provided in - // [document_text][google.cloud.automl.v1beta1.Document.document_text]. - ExamplePayload preprocessed_input = 3; - - // Additional domain-specific prediction response metadata. - // - // * For Image Object Detection: - // `max_bounding_box_count` - (int64) At most that many bounding boxes per - // image could have been returned. - // - // * For Text Sentiment: - // `sentiment_score` - (float, deprecated) A value between -1 and 1, - // -1 maps to least positive sentiment, while 1 maps to the most positive - // one and the higher the score, the more positive the sentiment in the - // document is. Yet these values are relative to the training data, so - // e.g. if all data was positive then -1 will be also positive (though - // the least). - // The sentiment_score shouldn't be confused with "score" or "magnitude" - // from the previous Natural Language Sentiment Analysis API. - map metadata = 2; -} - -// Request message for [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict]. -message BatchPredictRequest { - // Required. Name of the model requested to serve the batch prediction. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; - - // Required. The input configuration for batch prediction. - BatchPredictInputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Configuration specifying where output predictions should - // be written. - BatchPredictOutputConfig output_config = 4 [(google.api.field_behavior) = REQUIRED]; - - // Required. Additional domain-specific parameters for the predictions, any string must - // be up to 25000 characters long. - // - // * For Text Classification: - // - // `score_threshold` - (float) A value from 0.0 to 1.0. When the model - // makes predictions for a text snippet, it will only produce results - // that have at least this confidence score. The default is 0.5. - // - // * For Image Classification: - // - // `score_threshold` - (float) A value from 0.0 to 1.0. When the model - // makes predictions for an image, it will only produce results that - // have at least this confidence score. The default is 0.5. - // - // * For Image Object Detection: - // - // `score_threshold` - (float) When Model detects objects on the image, - // it will only produce bounding boxes which have at least this - // confidence score. Value in 0 to 1 range, default is 0.5. - // `max_bounding_box_count` - (int64) No more than this number of bounding - // boxes will be produced per image. Default is 100, the - // requested value may be limited by server. - // - // * For Video Classification : - // - // `score_threshold` - (float) A value from 0.0 to 1.0. When the model - // makes predictions for a video, it will only produce results that - // have at least this confidence score. The default is 0.5. - // `segment_classification` - (boolean) Set to true to request - // segment-level classification. AutoML Video Intelligence returns - // labels and their confidence scores for the entire segment of the - // video that user specified in the request configuration. - // The default is "true". - // `shot_classification` - (boolean) Set to true to request shot-level - // classification. AutoML Video Intelligence determines the boundaries - // for each camera shot in the entire segment of the video that user - // specified in the request configuration. AutoML Video Intelligence - // 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 training data, but there are no metrics - // provided to describe that quality. The default is "false". - // `1s_interval_classification` - (boolean) Set to true to request - // classification for a video at one-second intervals. AutoML Video - // Intelligence returns labels and their confidence scores for each - // second of the entire segment of the video that user specified in the - // request configuration. - // WARNING: Model evaluation is not done for this classification - // type, the quality of it depends on training data, but there are no - // metrics provided to describe that quality. The default is - // "false". - // - // * For Tables: - // - // feature_importance - (boolean) Whether feature importance - // should be populated in the returned TablesAnnotations. The - // default is false. - // - // * For Video Object Tracking: - // - // `score_threshold` - (float) When Model detects objects on video frames, - // it will only produce bounding boxes which have at least this - // confidence score. Value in 0 to 1 range, default is 0.5. - // `max_bounding_box_count` - (int64) No more than this number of bounding - // boxes will be returned per frame. Default is 100, the requested - // value may be limited by server. - // `min_bounding_box_size` - (float) Only bounding boxes with shortest edge - // at least that long as a relative value of video frame size will be - // returned. Value in 0 to 1 range. Default is 0. - map params = 5 [(google.api.field_behavior) = REQUIRED]; -} - -// Result of the Batch Predict. This message is returned in -// [response][google.longrunning.Operation.response] of the operation returned -// by the [PredictionService.BatchPredict][google.cloud.automl.v1beta1.PredictionService.BatchPredict]. -message BatchPredictResult { - // Additional domain-specific prediction response metadata. - // - // * For Image Object Detection: - // `max_bounding_box_count` - (int64) At most that many bounding boxes per - // image could have been returned. - // - // * For Video Object Tracking: - // `max_bounding_box_count` - (int64) At most that many bounding boxes per - // frame could have been returned. - map metadata = 1; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/ranges.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/ranges.proto deleted file mode 100644 index 89572bb05..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/ranges.proto +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "RangesProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A range between two double numbers. -message DoubleRange { - // Start of the range, inclusive. - double start = 1; - - // End of the range, exclusive. - double end = 2; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/regression.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/regression.proto deleted file mode 100644 index 1286d3d80..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/regression.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_outer_classname = "RegressionProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Metrics for regression problems. -message RegressionEvaluationMetrics { - // Output only. Root Mean Squared Error (RMSE). - float root_mean_squared_error = 1; - - // Output only. Mean Absolute Error (MAE). - float mean_absolute_error = 2; - - // Output only. Mean absolute percentage error. Only set if all ground truth - // values are are positive. - float mean_absolute_percentage_error = 3; - - // Output only. R squared. - float r_squared = 4; - - // Output only. Root mean squared log error. - float root_mean_squared_log_error = 5; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/service.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/service.proto deleted file mode 100644 index a421ece14..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/service.proto +++ /dev/null @@ -1,800 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/annotation_payload.proto"; -import "google/cloud/automl/v1beta1/annotation_spec.proto"; -import "google/cloud/automl/v1beta1/column_spec.proto"; -import "google/cloud/automl/v1beta1/dataset.proto"; -import "google/cloud/automl/v1beta1/image.proto"; -import "google/cloud/automl/v1beta1/io.proto"; -import "google/cloud/automl/v1beta1/model.proto"; -import "google/cloud/automl/v1beta1/model_evaluation.proto"; -import "google/cloud/automl/v1beta1/operations.proto"; -import "google/cloud/automl/v1beta1/table_spec.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/field_mask.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "AutoMlProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// AutoML Server API. -// -// The resource names are assigned by the server. -// The server never reuses names that it has created after the resources with -// those names are deleted. -// -// An ID of a resource is the last element of the item's resource name. For -// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`, then -// the id for the item is `{dataset_id}`. -// -// Currently the only supported `location_id` is "us-central1". -// -// On any input that is documented to expect a string parameter in -// snake_case or kebab-case, either of those cases is accepted. -service AutoMl { - option (google.api.default_host) = "automl.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a dataset. - rpc CreateDataset(CreateDatasetRequest) returns (Dataset) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/datasets" - body: "dataset" - }; - option (google.api.method_signature) = "parent,dataset"; - } - - // Gets a dataset. - rpc GetDataset(GetDatasetRequest) returns (Dataset) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/datasets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists datasets in a project. - rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/datasets" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a dataset. - rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) { - option (google.api.http) = { - patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}" - body: "dataset" - }; - option (google.api.method_signature) = "dataset"; - } - - // Deletes a dataset and all of its contents. - // Returns empty response in the - // [response][google.longrunning.Operation.response] field when it completes, - // and `delete_details` in the - // [metadata][google.longrunning.Operation.metadata] field. - rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Imports data into a dataset. - // For Tables this method can only be called on an empty Dataset. - // - // For Tables: - // * A - // [schema_inference_version][google.cloud.automl.v1beta1.InputConfig.params] - // parameter must be explicitly set. - // Returns an empty response in the - // [response][google.longrunning.Operation.response] field when it completes. - rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:importData" - body: "*" - }; - option (google.api.method_signature) = "name,input_config"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Exports dataset's data to the provided output location. - // Returns an empty response in the - // [response][google.longrunning.Operation.response] field when it completes. - rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:exportData" - body: "*" - }; - option (google.api.method_signature) = "name,output_config"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Gets an annotation spec. - rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets a table spec. - rpc GetTableSpec(GetTableSpecRequest) returns (TableSpec) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists table specs in a dataset. - rpc ListTableSpecs(ListTableSpecsRequest) returns (ListTableSpecsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/tableSpecs" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a table spec. - rpc UpdateTableSpec(UpdateTableSpecRequest) returns (TableSpec) { - option (google.api.http) = { - patch: "/v1beta1/{table_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*}" - body: "table_spec" - }; - option (google.api.method_signature) = "table_spec"; - } - - // Gets a column spec. - rpc GetColumnSpec(GetColumnSpecRequest) returns (ColumnSpec) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists column specs in a table spec. - rpc ListColumnSpecs(ListColumnSpecsRequest) returns (ListColumnSpecsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/tableSpecs/*}/columnSpecs" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a column spec. - rpc UpdateColumnSpec(UpdateColumnSpecRequest) returns (ColumnSpec) { - option (google.api.http) = { - patch: "/v1beta1/{column_spec.name=projects/*/locations/*/datasets/*/tableSpecs/*/columnSpecs/*}" - body: "column_spec" - }; - option (google.api.method_signature) = "column_spec"; - } - - // Creates a model. - // Returns a Model in the [response][google.longrunning.Operation.response] - // field when it completes. - // When you create a model, several model evaluations are created for it: - // a global evaluation, and one evaluation for each annotation spec. - rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/models" - body: "model" - }; - option (google.api.method_signature) = "parent,model"; - option (google.longrunning.operation_info) = { - response_type: "Model" - metadata_type: "OperationMetadata" - }; - } - - // Gets a model. - rpc GetModel(GetModelRequest) returns (Model) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/models/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists models. - rpc ListModels(ListModelsRequest) returns (ListModelsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/models" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a model. - // Returns `google.protobuf.Empty` in the - // [response][google.longrunning.Operation.response] field when it completes, - // and `delete_details` in the - // [metadata][google.longrunning.Operation.metadata] field. - rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/models/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Deploys a model. If a model is already deployed, deploying it with the - // same parameters has no effect. Deploying with different parametrs - // (as e.g. changing - // - // [node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number]) - // will reset the deployment state without pausing the model's availability. - // - // Only applicable for Text Classification, Image Object Detection , Tables, and Image Segmentation; all other domains manage - // deployment automatically. - // - // Returns an empty response in the - // [response][google.longrunning.Operation.response] field when it completes. - rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/models/*}:deploy" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Undeploys a model. If the model is not deployed this method has no effect. - // - // Only applicable for Text Classification, Image Object Detection and Tables; - // all other domains manage deployment automatically. - // - // Returns an empty response in the - // [response][google.longrunning.Operation.response] field when it completes. - rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/models/*}:undeploy" - body: "*" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Exports a trained, "export-able", model to a user specified Google Cloud - // Storage location. A model is considered export-able if and only if it has - // an export format defined for it in - // - // [ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - // - // Returns an empty response in the - // [response][google.longrunning.Operation.response] field when it completes. - rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/models/*}:export" - body: "*" - }; - option (google.api.method_signature) = "name,output_config"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Exports examples on which the model was evaluated (i.e. which were in the - // TEST set of the dataset the model was created from), together with their - // ground truth annotations and the annotations created (predicted) by the - // model. - // The examples, ground truth and predictions are exported in the state - // they were at the moment the model was evaluated. - // - // This export is available only for 30 days since the model evaluation is - // created. - // - // Currently only available for Tables. - // - // Returns an empty response in the - // [response][google.longrunning.Operation.response] field when it completes. - rpc ExportEvaluatedExamples(ExportEvaluatedExamplesRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/models/*}:exportEvaluatedExamples" - body: "*" - }; - option (google.api.method_signature) = "name,output_config"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } - - // Gets a model evaluation. - rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/models/*/modelEvaluations/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists model evaluations. - rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/models/*}/modelEvaluations" - }; - option (google.api.method_signature) = "parent"; - } -} - -// Request message for [AutoMl.CreateDataset][google.cloud.automl.v1beta1.AutoMl.CreateDataset]. -message CreateDatasetRequest { - // Required. The resource name of the project to create the dataset for. - 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]; -} - -// Request message for [AutoMl.GetDataset][google.cloud.automl.v1beta1.AutoMl.GetDataset]. -message GetDatasetRequest { - // Required. The resource name of the dataset to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Dataset" - } - ]; -} - -// Request message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]. -message ListDatasetsRequest { - // Required. The resource name of the project from which to list datasets. - 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. - // - // * `dataset_metadata` - for existence of the case (e.g. - // image_classification_dataset_metadata:*). Some examples of using the filter are: - // - // * `translation_dataset_metadata:*` --> The dataset has - // translation_dataset_metadata. - string filter = 3; - - // Requested page size. Server may return fewer results than requested. - // If unspecified, server will pick a default size. - int32 page_size = 4; - - // A token identifying a page of results for the server to return - // Typically obtained via - // [ListDatasetsResponse.next_page_token][google.cloud.automl.v1beta1.ListDatasetsResponse.next_page_token] of the previous - // [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets] call. - string page_token = 6; -} - -// Response message for [AutoMl.ListDatasets][google.cloud.automl.v1beta1.AutoMl.ListDatasets]. -message ListDatasetsResponse { - // The datasets read. - repeated Dataset datasets = 1; - - // A token to retrieve next page of results. - // Pass to [ListDatasetsRequest.page_token][google.cloud.automl.v1beta1.ListDatasetsRequest.page_token] to obtain that page. - string next_page_token = 2; -} - -// Request message for [AutoMl.UpdateDataset][google.cloud.automl.v1beta1.AutoMl.UpdateDataset] -message UpdateDatasetRequest { - // Required. The dataset which replaces the resource on the server. - Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED]; - - // The update mask applies to the resource. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for [AutoMl.DeleteDataset][google.cloud.automl.v1beta1.AutoMl.DeleteDataset]. -message DeleteDatasetRequest { - // Required. The resource name of the dataset to delete. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Dataset" - } - ]; -} - -// Request message for [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData]. -message ImportDataRequest { - // Required. Dataset name. Dataset must already exist. All imported - // annotations and examples will be added. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Dataset" - } - ]; - - // Required. The desired input location and its domain specific semantics, - // if any. - InputConfig input_config = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [AutoMl.ExportData][google.cloud.automl.v1beta1.AutoMl.ExportData]. -message ExportDataRequest { - // Required. The resource name of the dataset. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Dataset" - } - ]; - - // Required. The desired output location. - OutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [AutoMl.GetAnnotationSpec][google.cloud.automl.v1beta1.AutoMl.GetAnnotationSpec]. -message GetAnnotationSpecRequest { - // Required. The resource name of the annotation spec to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/AnnotationSpec" - } - ]; -} - -// Request message for [AutoMl.GetTableSpec][google.cloud.automl.v1beta1.AutoMl.GetTableSpec]. -message GetTableSpecRequest { - // Required. The resource name of the table spec to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/TableSpec" - } - ]; - - // Mask specifying which fields to read. - google.protobuf.FieldMask field_mask = 2; -} - -// Request message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. -message ListTableSpecsRequest { - // Required. The resource name of the dataset to list table specs from. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Dataset" - } - ]; - - // Mask specifying which fields to read. - google.protobuf.FieldMask field_mask = 2; - - // Filter expression, see go/filtering. - string filter = 3; - - // Requested page size. The server can return fewer results than requested. - // If unspecified, the server will pick a default size. - int32 page_size = 4; - - // A token identifying a page of results for the server to return. - // Typically obtained from the - // [ListTableSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListTableSpecsResponse.next_page_token] field of the previous - // [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs] call. - string page_token = 6; -} - -// Response message for [AutoMl.ListTableSpecs][google.cloud.automl.v1beta1.AutoMl.ListTableSpecs]. -message ListTableSpecsResponse { - // The table specs read. - repeated TableSpec table_specs = 1; - - // A token to retrieve next page of results. - // Pass to [ListTableSpecsRequest.page_token][google.cloud.automl.v1beta1.ListTableSpecsRequest.page_token] to obtain that page. - string next_page_token = 2; -} - -// Request message for [AutoMl.UpdateTableSpec][google.cloud.automl.v1beta1.AutoMl.UpdateTableSpec] -message UpdateTableSpecRequest { - // Required. The table spec which replaces the resource on the server. - TableSpec table_spec = 1 [(google.api.field_behavior) = REQUIRED]; - - // The update mask applies to the resource. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for [AutoMl.GetColumnSpec][google.cloud.automl.v1beta1.AutoMl.GetColumnSpec]. -message GetColumnSpecRequest { - // Required. The resource name of the column spec to retrieve. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/ColumnSpec" - } - ]; - - // Mask specifying which fields to read. - google.protobuf.FieldMask field_mask = 2; -} - -// Request message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. -message ListColumnSpecsRequest { - // Required. The resource name of the table spec to list column specs from. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/TableSpec" - } - ]; - - // Mask specifying which fields to read. - google.protobuf.FieldMask field_mask = 2; - - // Filter expression, see go/filtering. - string filter = 3; - - // Requested page size. The server can return fewer results than requested. - // If unspecified, the server will pick a default size. - int32 page_size = 4; - - // A token identifying a page of results for the server to return. - // Typically obtained from the - // [ListColumnSpecsResponse.next_page_token][google.cloud.automl.v1beta1.ListColumnSpecsResponse.next_page_token] field of the previous - // [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs] call. - string page_token = 6; -} - -// Response message for [AutoMl.ListColumnSpecs][google.cloud.automl.v1beta1.AutoMl.ListColumnSpecs]. -message ListColumnSpecsResponse { - // The column specs read. - repeated ColumnSpec column_specs = 1; - - // A token to retrieve next page of results. - // Pass to [ListColumnSpecsRequest.page_token][google.cloud.automl.v1beta1.ListColumnSpecsRequest.page_token] to obtain that page. - string next_page_token = 2; -} - -// Request message for [AutoMl.UpdateColumnSpec][google.cloud.automl.v1beta1.AutoMl.UpdateColumnSpec] -message UpdateColumnSpecRequest { - // Required. The column spec which replaces the resource on the server. - ColumnSpec column_spec = 1 [(google.api.field_behavior) = REQUIRED]; - - // The update mask applies to the resource. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for [AutoMl.CreateModel][google.cloud.automl.v1beta1.AutoMl.CreateModel]. -message CreateModelRequest { - // Required. Resource name of the parent project where the model is being created. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The model to create. - Model model = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [AutoMl.GetModel][google.cloud.automl.v1beta1.AutoMl.GetModel]. -message GetModelRequest { - // Required. Resource name of the model. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; -} - -// Request message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels]. -message ListModelsRequest { - // Required. Resource name of the project, from which to list the models. - 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. - // - // * `model_metadata` - for existence of the case (e.g. - // video_classification_model_metadata:*). - // * `dataset_id` - for = or !=. Some examples of using the filter are: - // - // * `image_classification_model_metadata:*` --> The model has - // image_classification_model_metadata. - // * `dataset_id=5` --> The model was created from a dataset with ID 5. - string filter = 3; - - // Requested page size. - int32 page_size = 4; - - // A token identifying a page of results for the server to return - // Typically obtained via - // [ListModelsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelsResponse.next_page_token] of the previous - // [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels] call. - string page_token = 6; -} - -// Response message for [AutoMl.ListModels][google.cloud.automl.v1beta1.AutoMl.ListModels]. -message ListModelsResponse { - // List of models in the requested page. - repeated Model model = 1; - - // A token to retrieve next page of results. - // Pass to [ListModelsRequest.page_token][google.cloud.automl.v1beta1.ListModelsRequest.page_token] to obtain that page. - string next_page_token = 2; -} - -// Request message for [AutoMl.DeleteModel][google.cloud.automl.v1beta1.AutoMl.DeleteModel]. -message DeleteModelRequest { - // Required. Resource name of the model being deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; -} - -// Request message for [AutoMl.DeployModel][google.cloud.automl.v1beta1.AutoMl.DeployModel]. -message DeployModelRequest { - // The per-domain specific deployment parameters. - oneof model_deployment_metadata { - // Model deployment metadata specific to Image Object Detection. - ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2; - - // Model deployment metadata specific to Image Classification. - ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4; - } - - // Required. Resource name of the model to deploy. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; -} - -// Request message for [AutoMl.UndeployModel][google.cloud.automl.v1beta1.AutoMl.UndeployModel]. -message UndeployModelRequest { - // Required. Resource name of the model to undeploy. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; -} - -// Request message for [AutoMl.ExportModel][google.cloud.automl.v1beta1.AutoMl.ExportModel]. -// Models need to be enabled for exporting, otherwise an error code will be -// returned. -message ExportModelRequest { - // Required. The resource name of the model to export. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; - - // Required. The desired output location and configuration. - ModelExportOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [AutoMl.ExportEvaluatedExamples][google.cloud.automl.v1beta1.AutoMl.ExportEvaluatedExamples]. -message ExportEvaluatedExamplesRequest { - // Required. The resource name of the model whose evaluated examples are to - // be exported. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; - - // Required. The desired output location and configuration. - ExportEvaluatedExamplesOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [AutoMl.GetModelEvaluation][google.cloud.automl.v1beta1.AutoMl.GetModelEvaluation]. -message GetModelEvaluationRequest { - // Required. Resource name for the model evaluation. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/ModelEvaluation" - } - ]; -} - -// Request message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. -message ListModelEvaluationsRequest { - // Required. Resource name of the model to list the model evaluations for. - // If modelId is set as "-", this will list model evaluations from across all - // models of the parent location. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "automl.googleapis.com/Model" - } - ]; - - // An expression for filtering the results of the request. - // - // * `annotation_spec_id` - for =, != or existence. See example below for - // the last. - // - // Some examples of using the filter are: - // - // * `annotation_spec_id!=4` --> The model evaluation was done for - // annotation spec with ID different than 4. - // * `NOT annotation_spec_id:*` --> The model evaluation was done for - // aggregate of all annotation specs. - string filter = 3; - - // Requested page size. - int32 page_size = 4; - - // A token identifying a page of results for the server to return. - // Typically obtained via - // [ListModelEvaluationsResponse.next_page_token][google.cloud.automl.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous - // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] call. - string page_token = 6; -} - -// Response message for [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations]. -message ListModelEvaluationsResponse { - // List of model evaluations in the requested page. - repeated ModelEvaluation model_evaluation = 1; - - // A token to retrieve next page of results. - // Pass to the [ListModelEvaluationsRequest.page_token][google.cloud.automl.v1beta1.ListModelEvaluationsRequest.page_token] field of a new - // [AutoMl.ListModelEvaluations][google.cloud.automl.v1beta1.AutoMl.ListModelEvaluations] request to obtain that page. - string next_page_token = 2; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/table_spec.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/table_spec.proto deleted file mode 100644 index bc3fc7440..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/table_spec.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/resource.proto"; -import "google/cloud/automl/v1beta1/io.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A specification of a relational table. -// The table's schema is represented via its child column specs. It is -// pre-populated as part of ImportData by schema inference algorithm, the -// version of which is a required parameter of ImportData InputConfig. -// Note: While working with a table, at times the schema may be -// inconsistent with the data in the table (e.g. string in a FLOAT64 column). -// The consistency validation is done upon creation of a model. -// Used by: -// * Tables -message TableSpec { - option (google.api.resource) = { - type: "automl.googleapis.com/TableSpec" - pattern: "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}" - }; - - // Output only. The resource name of the table spec. - // Form: - // - // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/tableSpecs/{table_spec_id}` - string name = 1; - - // column_spec_id of the time column. Only used if the parent dataset's - // ml_use_column_spec_id is not set. Used to split rows into TRAIN, VALIDATE - // and TEST sets such that oldest rows go to TRAIN set, newest to TEST, and - // those in between to VALIDATE. - // Required type: TIMESTAMP. - // If both this column and ml_use_column are not set, then ML use of all rows - // will be assigned by AutoML. NOTE: Updates of this field will instantly - // affect any other users concurrently working with the dataset. - string time_column_spec_id = 2; - - // Output only. The number of rows (i.e. examples) in the table. - int64 row_count = 3; - - // Output only. The number of valid rows (i.e. without values that don't match - // DataType-s of their columns). - int64 valid_row_count = 4; - - // Output only. The number of columns of the table. That is, the number of - // child ColumnSpec-s. - int64 column_count = 7; - - // Output only. Input configs via which data currently residing in the table - // had been imported. - repeated InputConfig input_configs = 5; - - // Used to perform consistent read-modify-write updates. If not set, a blind - // "overwrite" update happens. - string etag = 6; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/tables.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/tables.proto deleted file mode 100644 index 5327f5e78..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/tables.proto +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/classification.proto"; -import "google/cloud/automl/v1beta1/column_spec.proto"; -import "google/cloud/automl/v1beta1/data_items.proto"; -import "google/cloud/automl/v1beta1/data_stats.proto"; -import "google/cloud/automl/v1beta1/ranges.proto"; -import "google/cloud/automl/v1beta1/regression.proto"; -import "google/cloud/automl/v1beta1/temporal.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/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Metadata for a dataset used for AutoML Tables. -message TablesDatasetMetadata { - // Output only. The table_spec_id of the primary table of this dataset. - string primary_table_spec_id = 1; - - // column_spec_id of the primary table's column that should be used as the - // training & prediction target. - // This column must be non-nullable and have one of following data types - // (otherwise model creation will error): - // - // * CATEGORY - // - // * FLOAT64 - // - // If the type is CATEGORY , only up to - // 100 unique values may exist in that column across all rows. - // - // NOTE: Updates of this field will instantly affect any other users - // concurrently working with the dataset. - string target_column_spec_id = 2; - - // column_spec_id of the primary table's column that should be used as the - // weight column, i.e. the higher the value the more important the row will be - // during model training. - // Required type: FLOAT64. - // Allowed values: 0 to 10000, inclusive on both ends; 0 means the row is - // ignored for training. - // If not set all rows are assumed to have equal weight of 1. - // NOTE: Updates of this field will instantly affect any other users - // concurrently working with the dataset. - string weight_column_spec_id = 3; - - // column_spec_id of the primary table column which specifies a possible ML - // use of the row, i.e. the column will be used to split the rows into TRAIN, - // VALIDATE and TEST sets. - // Required type: STRING. - // This column, if set, must either have all of `TRAIN`, `VALIDATE`, `TEST` - // among its values, or only have `TEST`, `UNASSIGNED` values. In the latter - // case the rows with `UNASSIGNED` value will be assigned by AutoML. Note - // that if a given ml use distribution makes it impossible to create a "good" - // model, that call will error describing the issue. - // If both this column_spec_id and primary table's time_column_spec_id are not - // set, then all rows are treated as `UNASSIGNED`. - // NOTE: Updates of this field will instantly affect any other users - // concurrently working with the dataset. - string ml_use_column_spec_id = 4; - - // Output only. Correlations between - // - // [TablesDatasetMetadata.target_column_spec_id][google.cloud.automl.v1beta1.TablesDatasetMetadata.target_column_spec_id], - // and other columns of the - // - // [TablesDatasetMetadataprimary_table][google.cloud.automl.v1beta1.TablesDatasetMetadata.primary_table_spec_id]. - // Only set if the target column is set. Mapping from other column spec id to - // its CorrelationStats with the target column. - // This field may be stale, see the stats_update_time field for - // for the timestamp at which these stats were last updated. - map target_column_correlations = 6; - - // Output only. The most recent timestamp when target_column_correlations - // field and all descendant ColumnSpec.data_stats and - // ColumnSpec.top_correlated_columns fields were last (re-)generated. Any - // changes that happened to the dataset afterwards are not reflected in these - // fields values. The regeneration happens in the background on a best effort - // basis. - google.protobuf.Timestamp stats_update_time = 7; -} - -// Model metadata specific to AutoML Tables. -message TablesModelMetadata { - // 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 = 17; - - // Required when optimization_objective is "MAXIMIZE_RECALL_AT_PRECISION". - // Must be between 0 and 1, inclusive. - float optimization_objective_precision_value = 18; - } - - // Column spec of the dataset's primary table's column the model is - // predicting. Snapshotted when model creation started. - // Only 3 fields are used: - // name - May be set on CreateModel, if it's not then the ColumnSpec - // corresponding to the current target_column_spec_id of the dataset - // the model is trained from is used. - // If neither is set, CreateModel will error. - // display_name - Output only. - // data_type - Output only. - ColumnSpec target_column_spec = 2; - - // Column specs of the dataset's primary table's columns, on which - // the model is trained and which are used as the input for predictions. - // The - // - // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] - // as well as, according to dataset's state upon model creation, - // - // [weight_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.weight_column_spec_id], - // and - // - // [ml_use_column][google.cloud.automl.v1beta1.TablesDatasetMetadata.ml_use_column_spec_id] - // must never be included here. - // - // Only 3 fields are used: - // - // * name - May be set on CreateModel, if set only the columns specified are - // used, otherwise all primary table's columns (except the ones listed - // above) are used for the training and prediction input. - // - // * display_name - Output only. - // - // * data_type - Output only. - repeated ColumnSpec input_feature_column_specs = 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; - - // Output only. Auxiliary information for each of the - // input_feature_column_specs with respect to this particular model. - repeated TablesModelColumnInfo tables_model_column_info = 5; - - // Required. The train budget of creating this model, expressed in milli node - // hours i.e. 1,000 value in this field means 1 node hour. - // - // The training cost of the model will not exceed this budget. The final cost - // will be attempted to be close to the budget, though may end up being (even) - // noticeably smaller - at the backend's discretion. This especially may - // happen when further model training ceases to provide any improvements. - // - // If the budget is set to a value known to be insufficient to train a - // model for the given dataset, the training won't be attempted and - // will error. - // - // The train budget must be between 1,000 and 72,000 milli node hours, - // inclusive. - int64 train_budget_milli_node_hours = 6; - - // 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 = 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 = 12; -} - -// Contains annotation details specific to Tables. -message TablesAnnotation { - // Output only. A confidence estimate between 0.0 and 1.0, inclusive. A higher - // value means greater confidence in the returned value. - // For - // - // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] - // of FLOAT64 data type the score is not populated. - float score = 1; - - // Output only. Only populated when - // - // [target_column_spec][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec] - // has FLOAT64 data type. An interval in which the exactly correct target - // value has 95% chance to be in. - DoubleRange prediction_interval = 4; - - // The predicted value of the row's - // - // [target_column][google.cloud.automl.v1beta1.TablesModelMetadata.target_column_spec]. - // The value depends on the column's DataType: - // - // * CATEGORY - the predicted (with the above confidence `score`) CATEGORY - // value. - // - // * FLOAT64 - the predicted (with above `prediction_interval`) FLOAT64 value. - google.protobuf.Value value = 2; - - // Output only. Auxiliary information for each of the model's - // - // [input_feature_column_specs][google.cloud.automl.v1beta1.TablesModelMetadata.input_feature_column_specs] - // with respect to this particular prediction. - // If no other fields than - // - // [column_spec_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_spec_name] - // and - // - // [column_display_name][google.cloud.automl.v1beta1.TablesModelColumnInfo.column_display_name] - // would be populated, then this whole field is not. - repeated TablesModelColumnInfo tables_model_column_info = 3; - - // Output only. Stores the prediction score for the baseline example, which - // is defined as the example with all values set to their baseline values. - // This is used as part of the Sampled Shapley explanation of the model's - // prediction. This field is populated only when feature importance is - // requested. For regression models, this holds the baseline prediction for - // the baseline example. For classification models, this holds the baseline - // prediction for the baseline example for the argmax class. - float baseline_score = 5; -} - -// An information specific to given column and Tables Model, in context -// of the Model and the predictions created by it. -message TablesModelColumnInfo { - // Output only. The name of the ColumnSpec describing the column. Not - // populated when this proto is outputted to BigQuery. - string column_spec_name = 1; - - // Output only. The display name of the column (same as the display_name of - // its ColumnSpec). - string column_display_name = 2; - - // Output only. When given as part of a Model (always populated): - // Measurement of how much model predictions correctness on the TEST data - // depend on values in this column. A value between 0 and 1, higher means - // higher influence. These values are normalized - for all input feature - // columns of a given model they add to 1. - // - // When given back by Predict (populated iff - // [feature_importance - // param][google.cloud.automl.v1beta1.PredictRequest.params] is set) or Batch - // Predict (populated iff - // [feature_importance][google.cloud.automl.v1beta1.PredictRequest.params] - // param is set): - // Measurement of how impactful for the prediction returned for the given row - // the value in this column was. Specifically, the feature importance - // specifies the marginal contribution that the feature made to the prediction - // score compared to the baseline score. These values are computed using the - // Sampled Shapley method. - float feature_importance = 3; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/temporal.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/temporal.proto deleted file mode 100644 index 76db8887c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/temporal.proto +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/protobuf/duration.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A time period inside of an example that has a time dimension (e.g. video). -message TimeSegment { - // Start of the time segment (inclusive), represented as the duration since - // the example start. - google.protobuf.Duration start_time_offset = 1; - - // End of the time segment (exclusive), represented as the duration since the - // example start. - google.protobuf.Duration end_time_offset = 2; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text.proto deleted file mode 100644 index f6f33185c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text.proto +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/classification.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "TextProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Dataset metadata for classification. -message TextClassificationDatasetMetadata { - // Required. Type of the classification problem. - ClassificationType classification_type = 1; -} - -// Model metadata that is specific to text classification. -message TextClassificationModelMetadata { - // Output only. Classification type of the dataset used to train this model. - ClassificationType classification_type = 3; -} - -// Dataset metadata that is specific to text extraction -message TextExtractionDatasetMetadata { - -} - -// Model metadata that is specific to text extraction. -message TextExtractionModelMetadata { - -} - -// Dataset metadata for text sentiment. -message TextSentimentDatasetMetadata { - // Required. 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 sentiment_max (inclusive on both ends), and all the values - // in the range must be represented in the dataset before a model can be - // created. - // sentiment_max value must be between 1 and 10 (inclusive). - int32 sentiment_max = 1; -} - -// Model metadata that is specific to text sentiment. -message TextSentimentModelMetadata { - -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_extraction.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_extraction.proto deleted file mode 100644 index cfb0e0b37..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_extraction.proto +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/text_segment.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Annotation for identifying spans of text. -message TextExtractionAnnotation { - // Required. Text extraction annotations can either be a text segment or a - // text relation. - oneof annotation { - // An entity annotation will set this, which is the part of the original - // text to which the annotation pertains. - TextSegment text_segment = 3; - } - - // Output only. A confidence estimate between 0.0 and 1.0. A higher value - // means greater confidence in correctness of the annotation. - float score = 1; -} - -// Model evaluation metrics for text extraction problems. -message TextExtractionEvaluationMetrics { - // Metrics for a single confidence threshold. - message ConfidenceMetricsEntry { - // Output only. The confidence threshold value used to compute the metrics. - // Only annotations with score of at least this threshold are considered to - // be ones the model would return. - float confidence_threshold = 1; - - // Output only. Recall under the given confidence threshold. - float recall = 3; - - // Output only. Precision under the given confidence threshold. - float precision = 4; - - // Output only. The harmonic mean of recall and precision. - float f1_score = 5; - } - - // Output only. The Area under precision recall curve metric. - float au_prc = 1; - - // Output only. Metrics that have confidence thresholds. - // Precision-recall curve can be derived from it. - repeated ConfidenceMetricsEntry confidence_metrics_entries = 2; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_segment.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_segment.proto deleted file mode 100644 index 94b17d930..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_segment.proto +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "TextSegmentProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// A contiguous part of a text (string), assuming it has an UTF-8 NFC encoding. -message TextSegment { - // Output only. The content of the TextSegment. - string content = 3; - - // Required. Zero-based character index of the first character of the text - // segment (counting characters from the beginning of the text). - int64 start_offset = 1; - - // Required. Zero-based character index of the first character past the end of - // the text segment (counting character from the beginning of the text). - // The character at the end_offset is NOT included in the text segment. - int64 end_offset = 2; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_sentiment.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_sentiment.proto deleted file mode 100644 index 5444c52b9..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/text_sentiment.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/classification.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_outer_classname = "TextSentimentProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Contains annotation details specific to text sentiment. -message TextSentimentAnnotation { - // Output only. The sentiment with the semantic, as given to the - // [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used - // for the prediction had been trained. - // The sentiment values are between 0 and - // Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive), - // with higher value meaning more positive sentiment. They are completely - // relative, i.e. 0 means least positive sentiment and sentiment_max means - // the most positive from the sentiments present in the train data. Therefore - // e.g. if train data had only negative sentiment, then sentiment_max, would - // be still negative (although least negative). - // The sentiment shouldn't be confused with "score" or "magnitude" - // from the previous Natural Language Sentiment Analysis API. - int32 sentiment = 1; -} - -// Model evaluation metrics for text sentiment problems. -message TextSentimentEvaluationMetrics { - // Output only. Precision. - float precision = 1; - - // Output only. Recall. - float recall = 2; - - // Output only. The harmonic mean of recall and precision. - float f1_score = 3; - - // Output only. Mean absolute error. Only set for the overall model - // evaluation, not for evaluation of a single annotation spec. - float mean_absolute_error = 4; - - // Output only. Mean squared error. Only set for the overall model - // evaluation, not for evaluation of a single annotation spec. - float mean_squared_error = 5; - - // Output only. Linear weighted kappa. Only set for the overall model - // evaluation, not for evaluation of a single annotation spec. - float linear_kappa = 6; - - // Output only. Quadratic weighted kappa. Only set for the overall model - // evaluation, not for evaluation of a single annotation spec. - float quadratic_kappa = 7; - - // Output only. Confusion matrix of the evaluation. - // Only set for the overall model evaluation, not for evaluation of a single - // annotation spec. - ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8; - - // Output only. The annotation spec ids used for this evaluation. - // Deprecated . - repeated string annotation_spec_id = 9 [deprecated = true]; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/translation.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/translation.proto deleted file mode 100644 index 8585bd410..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/translation.proto +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/cloud/automl/v1beta1/data_items.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "TranslationProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Dataset metadata that is specific to translation. -message TranslationDatasetMetadata { - // Required. The BCP-47 language code of the source language. - string source_language_code = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The BCP-47 language code of the target language. - string target_language_code = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Evaluation metrics for the dataset. -message TranslationEvaluationMetrics { - // Output only. BLEU score. - double bleu_score = 1; - - // Output only. BLEU score for base model. - double base_bleu_score = 2; -} - -// Model metadata that is specific to translation. -message TranslationModelMetadata { - // The resource name of the model to use as a baseline to train the custom - // model. If unset, we use the default base model provided by Google - // Translate. Format: - // `projects/{project_id}/locations/{location_id}/models/{model_id}` - string base_model = 1; - - // Output only. Inferred from the dataset. - // The source languge (The BCP-47 language code) that is used for training. - string source_language_code = 2; - - // Output only. The target languge (The BCP-47 language code) that is used for - // training. - string target_language_code = 3; -} - -// Annotation details specific to translation. -message TranslationAnnotation { - // Output only . The translated content. - TextSnippet translated_content = 1; -} diff --git a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/video.proto b/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/video.proto deleted file mode 100644 index 268ae2a8c..000000000 --- a/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/video.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.automl.v1beta1; - -import "google/cloud/automl/v1beta1/classification.proto"; -import "google/api/annotations.proto"; - -option go_package = "google.golang.org/genproto/googleapis/cloud/automl/v1beta1;automl"; -option java_multiple_files = true; -option java_outer_classname = "VideoProto"; -option java_package = "com.google.cloud.automl.v1beta1"; -option php_namespace = "Google\\Cloud\\AutoMl\\V1beta1"; -option ruby_package = "Google::Cloud::AutoML::V1beta1"; - -// Dataset metadata specific to video classification. -// All Video Classification datasets are treated as multi label. -message VideoClassificationDatasetMetadata { - -} - -// Dataset metadata specific to video object tracking. -message VideoObjectTrackingDatasetMetadata { - -} - -// Model metadata specific to video classification. -message VideoClassificationModelMetadata { - -} - -// Model metadata specific to video object tracking. -message VideoObjectTrackingModelMetadata { - -} diff --git a/synth.metadata b/synth.metadata index ea9ece1ba..274f47a82 100644 --- a/synth.metadata +++ b/synth.metadata @@ -10,44 +10,27 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/java-automl.git", - "sha": "45e55ecb207da3ad0d1fe6548228b172fbb526df" + "remote": "git@github.com:stephaniewang526/java-automl.git", + "sha": "a78541a3f9314ea24e9e37a239ef1d207abdc1d5" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aed11c01e52921613b9ee469c2d85f5f33175fb7", - "internalRef": "310660461" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "aed11c01e52921613b9ee469c2d85f5f33175fb7", - "internalRef": "310660461" + "sha": "907754d70ec714ab0e8282fe6ff4988221c64130", + "internalRef": "314217336" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5b48b0716a36ca069db3038da7e205c87a22ed19" + "sha": "cb3c683e958a4b5c016bb3734436fc1cb887eb7b" } } ], "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "automl", - "apiVersion": "v1beta1", - "language": "java", - "generator": "bazel" - } - }, { "client": { "source": "googleapis", diff --git a/synth.py b/synth.py index 06a8e28c0..f9087568b 100644 --- a/synth.py +++ b/synth.py @@ -23,7 +23,7 @@ gapic = gcp.GAPICGenerator() service = 'automl' -versions = ['v1beta1', 'v1'] +versions = ['v1'] for version in versions: library = java.bazel_library( diff --git a/versions.txt b/versions.txt index 42977c6cf..11f86ee4a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-automl-v1beta1:0.82.2:0.82.3-SNAPSHOT proto-google-cloud-automl-v1:1.1.2:1.1.3-SNAPSHOT -grpc-google-cloud-automl-v1beta1:0.82.2:0.82.3-SNAPSHOT grpc-google-cloud-automl-v1:1.1.2:1.1.3-SNAPSHOT google-cloud-automl:1.1.2:1.1.3-SNAPSHOT \ No newline at end of file